Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More

generator-kissy-pie

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

generator-kissy-pie

kissy generator for kissypie


Version published
Weekly downloads
14
increased by1300%
Maintainers
1
Weekly downloads
 
Created

A yeoman generator for kissy pie

install

安装yeoman

npm install yo -g

安装Generator

第一步:

$ npm link

第二步, 在你的应用目录内:

$ mkdir my-app && cd myapp
$ yo kissy-pie #执行yeoman

快速使用

打开Gruntfile.js,找到文件上方的这个部分:

 /**
     * 下列命令执行下面命令若不给定参数,则默认添加下面配置
     *      `grunt watch`
     *      `grunt page`
     *      `grunt common`
     * 可用配置:
     *      timestamp: {String} 时间戳目录,
     *      buildPage: {String|Array} pageName/version/pkgName
     */
    var DEFAULTS = {
        timestamp: '20130510',
        buildPages: [ 'finished_task/1.0']
    };

设置你需要打包的page,原码版本和对应的时间戳:

如,需要将index页面的1.0版本打包到时间戳20130508:

    var DEFAULTS = {
        timestamp: '20130508',
        buildPages: [ 'index/1.0']
    };

之后则可以直接使用 grunt 或者 grunt page进行打包,使用grunt watch进行文件监控。

命令行

使用命令行将覆盖Gruntfile.js中对于build目标的配置,具体使用如下:

单个页面:
     *          打包:     `grunt page --target home/1.0 --ts 20130412`
     *          watch:    `grunt watch --target home/1.0 --ts 20130412`      
多个页面:
     *          打包:     `grunt page --target home/1.0,intro/2.0 --ts 20130506`
     *          watch:    `grunt watch --target home/1.0,intro/2.0 --ts 20130506`

FAQs

Package last updated on 02 Jun 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts