gulp based build tool for frontend
- RUN
$ cd path/to/project/root # Path to Workspace (Eclipse) / Project (IDEA) ROOT
# for gulpfile.js
$ curl -o ./download.zip http://www.status404.cn/BuildTool/build.zip && unzip -uo ./download.zip -d ./ && rm ./download.zip && npm install
# or
# for gulpfile2.js
$ curl -o ./download.zip http://www.status404.cn/BuildTool/build2.zip && unzip -uo ./download.zip -d ./ && rm ./download.zip && npm install- package-out.json is used for building your files
$ npm run init
# input destination path
Input Project Destination(Enter 'exit' for quit): ${dest folder path}
# if your path is out of the project, a confirm will show
Path ../target is Out of Project, continue?[y|n]- For IDE with gulp manager, setup in your IDE. Or run:
$ npm run gulp- And enjoy your coding
- For
gulpfile2.jsusers, also enjoy your sites onhttp://localhost:8080/path/to/your/html- You can setup your port in
gulpfile.jsat about line 79serverSettings.port
- You can setup your port in
This tool will:
- Compile less files
- Compile ts files
- Downgrade ES6 to ES5 (with babel)
- Include template into your html with gulp-file-include with
@@include('relative.path.to.template.html', {replacement}) - Compress .less/.css/.js files
- Start up a server on port 8080 with LiveReload(Only in
gulpfile2.js)
Note:
- If downgrade or compress
.jsfile is not needed, rename it to*.min.js, tool will only copy*.min.jsfile - Like
.eslintignore, you can setup ignore paths/files in.gulpignoree.g.
## .gulpignore
**/foo/** # ignore mathed path
./path/to/js/file.js # ignore file
# Comment is not supported, delete comments and extra blanks when usetransform-remove-strict-mode plugin is used to remove global "use strict", remove the plugin if needed
ESLint and related packages have already added in package.json and by default .eslintrc.js is setup to Standard Style
Setup your editor to enable eslint to lint your javascript files: ATOM, IntelliJ Productions, Eclipse, Sublime