assets plugin for gulp
Usage
First, install gulp-assets
as a development dependency:
npm install --save-dev gulp-assets
Then, add it to your gulpfile.js
:
var assets = ; gulp ;
API
assets(options)
options.js
Type: either a boolean
or a string
Default: true
Whether you wish to get javascript files. If a string is used, only the javascript files between the appropriate comment tags will be used.
Example:
<!-- build:myJsTag --><!-- endbuild -->
You will only get js/foo.js
in your build stream
options.css
Type: either a boolean
or a string
Default: false
Whether you wish to get css files. If a string is used, only the css files between the appropriate comment tags will be used.
Example:
<!-- build:myCssTag --><!-- endbuild -->
options.cwd
Type: string
Default: undefined
If set, will be used as a base when building the files' paths.
Shortcuts methods:
assets; // Only js files (between comment tags if tagname is set)assets; // Only css files (between comment tags if tagname is set)
Contributors
- @kjbekkelund
- @Zweer
- @shinnn