/venustech-cli

Auto generate project template

Primary LanguageJavaScript

venustech-cli

Auto generate project template

Table of Contents

Note

在使用该工具之前,确保本地环境已安装 Nodejs, Gulp, Bower。查看是否安装成功,可用以下命令:

node -v
npm -v
gulp -v
bower -v

Installation

Install this tool by npm:

npm install venustech-cli -g

Usage

Create your porject directory, and use "webapp-cli" command:

mkdir my-project && cd my-project
venus

image

Argv

可接受一个命令行参数, -lib ,用于添加更多的资源文件,如下图所示:

venus -lib

image image

Run

在项目骨架 build success 后,需运行以下命令去下载依赖的包和三方资源文件:

bower install
npm install

install成功后,应生成 node_modules 和 bower_components 两个目录。

Skeleton

    \---bower_components
    \---node_modules
    \---images
    \---source
        |     \---controller   
        |         | +---mainCtrl.js  
        |     \---css
        |         | +---al.css 
        |         | +---common.css
        |         | +---cy.css
        |     \---directive
        |         | +---directive.js  
        |     \---service 
        |         | +---app.js 
        |         | +---myFilter.js
        |         | +---router.js
    \---templates   
        +---main.html   
    +---bower.json
    +---.gitignore
    +---gulpfile.js
    +---index.html
    +---package.json