-
Notifications
You must be signed in to change notification settings - Fork 4
[gulp] JS Compilation
This tasks will compile the .js
files into one single file production.js
and production-min.js
(2 files to be exact) it will:
- Compile the
js
files into one two files (mentioned above). -
production.js
has a source map to faster access to the original JS files and is un-minified. -
production-min.js
is the minified and compress version of thejs
and does not have a source map.
gulp js
This tasks has js:minify
as one dependency, it will run js:minify
before the execution of this task.
This tasks will create a minified version of the one single js
file. This minified version is used in production and does not have any source map.
gulp js:minify
This tasks has js:combine
as one dependency, it will run js:combine
before the execution of this task.
This tasks will combine all of the files inside of jsFiles
array, by updating that file from gulpfile.js
you can add more files or remove some of the final result in the JS files. This tasks will create a single .js
file and will associate a source map for debug purposes to this file.
gulp js:combine
It will run both tasks: js:hint
and js:cs
, one after the another is finished and can be used for faster access to both single tasks. It will apply the JS rules against the .js
files specified in the jsFiles
array.
gulp js:lint
It will apply the rules from .jshintrc
file against the .js
files specified in the jsFiles
array. To make sure we follow the airbnb style guide for js
files. This tasks does not break the gulp execution as js:hint-ci
does.
gulp js:hint
It will apply the rules from .jshintrc
file against the .js
files specified in the jsFiles
array. To make sure we follow the airbnb style guide for js
files. This tasks does not break the gulp execution as js:cs-ci
does.
gulp js:cs