1.0.1 • Published 2 years ago

neuton-web-cli v1.0.1

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

neuton-web-cli NPM version Build Status Dependency Status

web端脚手架

安装起步

npm安装

npm install -g neuton-web-cli

yarn安装

yarn global add neuton-web-cli

基本使用

neuton init

会出现下面的提问 项目名 ? 请输入项目名? (vue-template) 描述 ? 请输入项目描述? (a simple description)

安装完成之后,项目目录中自动就有了配置文件

进阶使用--创建组件

neuton comp arvg1 arvg2

arvg1为组件所属文件夹, arvg2为组件名称

neuton comp common layout

会自动在components文件夹创建common文件夹下名为layout.vue的组件模板

冲突解决

当使用component命令创建的组件已存在且与模板不同时,会询问如何解决冲突:(ynaxhd),输入字母并回车将采取对应方案解决冲突。

y(yes),默认选项,选择重写组件,会覆盖已存在的组件。

n(no),选择不重写组件,即保留原组件。

a(always),选择重写此组件以及之后所有的组件(如果有)。

x(abort),终止操作

d(different),显示新旧文件的区别 红色为原文件的内容,绿色为新文件新增的内容

h(help),帮助,列出所有选项

Getting To Know Yeoman

  • Yeoman has a heart of gold.
  • Yeoman is a person with feelings and opinions, but is very easy to work with.
  • Yeoman can be too opinionated at times but is easily convinced not to be.
  • Feel free to learn more about Yeoman.

License

MIT © 包雄飞