Comparing version 1.0.3 to 1.0.4
32
index.js
@@ -19,2 +19,3 @@ /** | ||
var vulcanize = require('gulp-vulcanize'); | ||
var gutil = require('gulp-util'); | ||
@@ -39,19 +40,24 @@ var htmlPipe = lazypipe() | ||
// rename files with an infix '.build' | ||
var renamePipe = lazypipe() | ||
module.exports = function(opts) { | ||
opts = opts || {}; | ||
var crush = opts.maximumCrush; | ||
var pipe = htmlPipe | ||
// switch between cleaning or minimizing javascript | ||
.pipe(crush ? uglify : leftAlign) | ||
// rename files with an infix '.build' | ||
.pipe(rename, function(path) { | ||
path.basename += '.build'; | ||
}) | ||
; | ||
// split the javascript out into `.build.js` for CSP compliance | ||
.pipe(crisper) | ||
() | ||
; | ||
module.exports = function(opts) { | ||
opts = opts || {}; | ||
var crush = opts.maximumCrush; | ||
return htmlPipe | ||
// switch between cleaning or minimizing javascript | ||
.pipe(crush ? uglify : leftAlign) | ||
.pipe(renamePipe) | ||
// split the javascript out into `.build.js` for CSP compliance | ||
.pipe(crisper) | ||
(); | ||
// have to handle errors ourselves, thanks gulp >:( | ||
pipe.on('error', function(error) { | ||
gutil.log(error.toString()); | ||
process.exit(1); | ||
}); | ||
return pipe; | ||
}; |
{ | ||
"name": "polybuild", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"main": "index.js", | ||
@@ -5,0 +5,0 @@ "scripts": { |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6840
53