1.1.3 • Published 8 years ago
gulp-shark-base v1.1.3
#gulp-shark-base
serval gulp task to help you to build your workflow easier
Installation
$ npm install --save-dev gulp-shark-base
API
var base = require('gulp-shark-base')
base(options)
options :the gulp plugin config options
Type: object
{
"webapp": "src/main/webapp",
"tmpDir": ".tmp"
"base": {
"autoprefixer":{
"remove": false,
"browsers": [
"last 2 versions"
]
}
}
"projectType":"Angular"
}
Usage
#Example:
//use in gulpfile.js
var runSequence = require('run-sequence'),
var base = require('gulp-shark-base');
//register gulp tasks
//appConfig: the config object
//tmp1: the source file dir
//tmp2: the output file dir
base(appConfig, tmp1, tmp2);
// execute tasks
runSequence(
// use reference in html and ftl
['useref-ftl', 'useref-html'],
// imagemin and copy to tmp1
'imagemin',
// revision images
'revision-image',
// revreplace images
['revreplace-css', 'revreplace-js'],
// revision css,js
['revision-css', 'revision-js'],
// revreplace html,ftl
['revreplace-html', 'revreplace-ftl'],
// copy to build dir, copy java
['copy-build', 'copy-build-java-conf'],
// callback
cb
);