摘要: 一、 由于交互的问题种类不同,inquirer为每个问题提供很多参数: type:表示提问的类型,包括:input, confirm, list, rawlist, expand, checkbox, password, editor;name: 存储当前问题回答的变量;message:问题的描述; 阅读全文
posted @ 2019-03-10 19:27 shangyueyue 阅读(252) 评论(0) 推荐(0) 编辑
摘要: 1.path.basename(path[, ext]) ● path ● ext An optional file extension ● Returns: 只会返回路径的最后一部分 第二个参数用于截取 path.basename('/foo/bar/baz/asdf/quux.html'); // Returns: 'quux.html' path.basename('/f... 阅读全文
posted @ 2019-03-10 18:08 shangyueyue 阅读(155) 评论(0) 推荐(0) 编辑
摘要: 一、process process.argv process.env process.title process.platform process.execPath process.chdir():切换工作目录到指定目录。 process.cwd():返回运行当前脚本的工作目录的路径。 proces 阅读全文
posted @ 2019-03-10 17:22 shangyueyue 阅读(744) 评论(0) 推荐(0) 编辑