1508-cli 中文文档教程
1508-cli
将使我们的 webpack 支持的项目更容易添加新组件
Table of Contents
Installation
由于该工具是一个 cli,它需要全局安装才能真正使用
npm install -g 1508-cli
Usage
Start new project
要开始一个新项目,使用干净的样板,你可以直接启动
1508 init
但是一定要在一个空文件夹中,否则该命令不会执行任何操作。
但是,如果您在一个空文件夹中,该工具将提取最新版本的样板文件。
Component
要生成新组件,请导航到项目的根目录,然后运行以下命令
1508 component <name>
,这将创建基本组件所需的骨架文件。
Filter
要生成新过滤器,请导航到项目的根目录,然后运行以下命令
1508 filter <name>
,这将创建基本过滤器所需的骨架文件。
Service
要生成新服务,请导航到项目的根目录,然后运行以下命令
1508 service <name>
,这将创建基本服务所需的框架文件。
Available features
要查看所有可用选项,请运行 1508 --help
1508-cli
Will make adding new components easier to our webpack powered projects
Table of Contents
Installation
Since the tool is a cli, it needs to be installed globally to be of any real use
npm install -g 1508-cli
Usage
Start new project
To start a new project, with a clean boilerplate, you can just fire off
1508 init
But be sure to be in an empty folder, otherwise the command wont do anything.
If however you are in an empty folder, the tool will pull the latest version of the boilerplate.
Component
To generate a new component, navigate to the root of the project, and run the following command
1508 component <name>
That will create the skeleton files needed for a basic component.
Filter
To generate a new filter, navigate to the root of the project, and run the following command
1508 filter <name>
That will create the skeleton files needed for a basic filter.
Service
To generate a new service, navigate to the root of the project, and run the following command
1508 service <name>
That will create the skeleton files needed for a basic service.
Available features
To see all available options, run a 1508 --help