fan-create-cli

fan admin or mobile create

Usage no npm install needed!

<script type="module">
  import fanCreateCli from 'https://cdn.skypack.dev/fan-create-cli';
</script>

README

fan-create-cli


npm install -g fan-create-cli
fan-create-cli my-project

参考

commander 命令行工具

inquirer 命令行提示、请求输入(是完成和用户交互的)用法

execa 执行系统命令工具

fs-extra 文件、文件夹操作工具

opn 命令行打开浏览器工具

fancy-log 打印工具,带时间戳

chalk 命令行着色工具

debug 调试工具

log-update

cli-spinners

babel-paser JavaScript parser used in Babel.

shelljs是执行shell脚本的

-f:强制删除文件;
-i:删除之前先询问用户;
-r:递归处理目录;
-v:显示处理过程;
echo:在控制台输出指定内容
exit(code):以退出码为code退出当前进程
const shell = require('shelljs')
shell.rm('-rf','out/Release');//强制递归删除out/Release目录
shell.cp('-r','stuff/','out/Release');//将`stuff/`中所有内容拷贝至`out/Release`目录
shell.mv(`./ssr-with-${language}`, `./${option.appName}`) // 把移到文件

update-notifier是用来给CLI升级用的

metalsmith是拼接HTMl做项目模板的

参考资源1 参考资源2

shelljs