kenit
build your projects
Last updated 4 years ago by king0222 .
MIT · Original npm · Tarball · package.json
$ cnpm install kenit 
SYNC missed versions from official npm registry.

##使用方式

根目录添加kenit-config.json配置文件

{
	"clean": {
		"filePath": "./.build",
		"remark": "清理临时目录文件"
	},
	"less": {
		"fileIn": ["./test.less"],
		"fileOut": "./.build",
		"compress": false,
		"remark": "对于样式文件,通常合并成一个文件就够了,就没有多大必要做多文件处理了,如果设置了compress为true,则没必要进行下面的css构建了"
	},
	"coffee": {
		"fileIn": ["./coffee"],
		"fileOut": "./.build/js",
		"remark": "对于coffeescript脚本文件,需要的是分别编译成每一个javascript文件,便于开发调试,所以fileOut配置为一个目录路径!"
	},
	"css": {
		"fileIn": ["./.build"],
		"fileOut": "./build/test.min.css",
		"remark": "样式文件合并成一个文件就好了"
	},
	"js": {
		"fileIn": ["./.build/js/coffee/test.js"],
		"fileOut": "./build/test.min.js",
		"remark": "脚本文件合并成一个文件就好了"
	},
	"img": {
		"fileIn": ["./img", "./images"],
		"fileOut": "./build",
		"remark": "对于图片文件,没有合并的概念,需要做的是复制一份,并对它进行优化"
	},
	"debug": ["clean", "less", "coffee", "css", "js", "clean"],
	"build": ["clean", "less", "coffee", "css", "js", "img", "clean"]
}

配置中less,coffee,css,js,img为常用构建项目,可配置的属性通用fileIn, fileOut. fileIn的值为数组形式,fileOut的值为字符串.

debug为开发模式配置,这里配置了less的编译,css的压缩,coffee的编译,js的压缩. 同理build为发布模式配置.

##命令使用

npm install -g kenit

kenit -v

kenit -h

kenit -w
//监视less以及coffee

kenit -w less
//监视less

kenit -w coffee
//监视coffee

kenit css

kenit less

kenit coffee

kenit js

kenit img

kenit clean

kenit debug

kenit build

Current Tags

  • 1.0.3                                ...           latest (4 years ago)

4 Versions

  • 1.0.3                                ...           4 years ago
  • 1.0.2                                ...           4 years ago
  • 1.0.1                                ...           4 years ago
  • 1.0.0                                ...           4 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 6
Dependencies (12)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |