gulp-compiler-tool

0.1.3 • Public • Published

gulp源码编译工具

安装

npm

$ npm install gulp-compiler-tool --save-dev

yarn

$ yarn add gulp-compiler-tool --dev

使用示例

  • 直接使用

在package.json文件中添加以下字段:

"script": {
  "compiler": "gulp-compiler"
}

执行npm run compileryarn compiler默认会编译项目的src目录中的文件到dist目录。

  • 添加参数

如果你需要编译其他目录,该工具也提供选项指定编译路径和保存路径:

"script": {
  "compiler": "gulp-compiler --src sourceDir --dist outputDir"
}

也支持指定多个编译目录,只需要在多个目录之间用,分隔:

"script": {
  "compiler": "gulp-compiler --src sourceDir1,sourceDir2,sourceDir3,... --dist outputDir"
}

你也可以直接编译当前目录下的所有文件,用.表示,工具会自动排除node_modules和编译后的目录。

备注

  • 目前支持编译的样式表语言暂时只有less,其他样式表语言会直接被视为静态文件直接输出;
  • 编译js需要.babelrc文件。

许可信息

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i gulp-compiler-tool

Weekly Downloads

0

Version

0.1.3

License

MIT

Last publish

Collaborators

  • chenbingqi