gulp-edp
v0.0.9
Published
gulp with edp
Downloads
5
Readme
gulp-edp
gulp with edp
Usage
var gulp = require('gulp');
var edp = require('gulp-edp');
var edpConfig = require('./edp-build-config');
gulp.task('edp', function () {
return gulp.src(
[
'src/**',
'dep/**',
'!dep/**/{demo,demo/**}',
'!dep/**/{test,test/**}',
'*.html'
]
)
.pipe(edp(edpConfig))
.pipe(gulp.dest('dist'));
})
gulp.task('default', ['edp']);
Config
exclude
Type: Array
Set the files to be excluded. match minimatch
or Regular Expression
.
getProcessors
Type: Function
Return: Array
Create the edp processors, return processor list.
Processors
The following processors are bundled with edp:
- LessCompiler - Compile
*.less
to*.css
- StylusCompiler - Compile
*.styl
to*.css
- CssCompressor - Compress css with
clean-css
- JsCompressor - Compress js with
uglifyjs2
- ModuleCompiler - An
AMD
optimizer supports rich APIs - PathMapper - Repalce development path to production
- MD5Renamer - Rename filename with md5 and replace the links
- OutputCleaner - Ignore unuseful files
See Edp Build WIKI for more processors.
AMD Optimize
| | edp | requriejs(r.js) | amd-optimize | | ----------------- |:---:|:-----------------:|:------------:| | baseUrl | √ | √ | √ | | paths | √ | √ | √ | | packages | √ | √ | X | | map | √ | √ | √ | | shim | X | √ | √ | | stream friendly | √ | X | √ | | custom combine | √ | X | X |