Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

KSP plugin for Grunt

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 bin
Octocat-spinner-32 tasks
Octocat-spinner-32 test
Octocat-spinner-32 .npmignore
Octocat-spinner-32 LICENSE-MIT
Octocat-spinner-32 README.md
Octocat-spinner-32 grunt.js
Octocat-spinner-32 package.json
README.md

grunt-ksp

为Grunt编写的KSP插件(KSP是一个易用的针对KISSY 1.2的脚本打包工具)

如何开始

在终端中cd到你的项目目录(你的grunt.js所在目录),然后使用npm install grunt-ksp来安装插件

然后在你的配置文件 grunt.js 中引入该插件:

grunt.loadNpmTasks('grunt-ksp');

Grunt的使用请参考

Documentation

请先仔细阅读KSP的文档.

在grunt中使用的KSP很简单,只是简单地将配置信息从原来的ksp.json转移到grunt.js中了

grunt.initConfig({

        meta:{
            /* 发布版本号 */
            publish: 20120925
        },
        ksp:{
            project_v2:{
                "name":"v2",
                "pub":'<config:meta.publish>',
                "main":[
                    "source/js/msg_center.js",
                    "source/js/list.js"
                ],
                "output":"release/{{pub}}/js/{{filename}}-min.js",
                "compress":true,
                "unicode":true,
                "wrapConfig":true
            },

            project_v1: {
                ...
            }
        }
    });

然后我们可以便可以通过grunt命令来执行

$ grunt ksp

// 或者执行其中单个
$ grunt ksp:project_v1

License

Copyright (c) 2012 neekey
Licensed under the MIT license.

Something went wrong with that request. Please try again.