gib-recipe-browserify
Advanced tools
Comparing version 0.0.6 to 0.0.7
28
index.js
@@ -34,3 +34,3 @@ /** | ||
var b = watchify(browserify(options.browserify)); | ||
var b = watchify(browserify(options.src, options.browserify)); | ||
var gulp = null; | ||
@@ -46,2 +46,6 @@ | ||
if (options.require) { | ||
b.require(options.require) | ||
} | ||
// Task: | ||
@@ -72,8 +76,15 @@ function bundle () { | ||
.pipe(buffer()) | ||
.pipe(sourcemaps.init({loadMaps: true})) | ||
.pipe(uglify()) | ||
.pipe(sourcemaps.init({loadMaps: true})); | ||
// Uglify: | ||
// Maybe this condition should be injected? | ||
if (process.env.NODE_ENV === 'production') { | ||
bundle = bundle.pipe(uglify()); | ||
} | ||
// Destination: | ||
bundle = bundle | ||
.pipe(sourcemaps.write('./')) | ||
.pipe(gulp.dest(dest)); | ||
// Reload browser: | ||
@@ -98,9 +109,6 @@ if (options.refreshStream) { | ||
options.src = options.src || './src/index.js'; | ||
options.browserify = Object.assign(options.browserify || { | ||
options.browserify = Object.assign({ | ||
transform: [babelify.configure({ presets: ['es2015'] })], | ||
debug: true, | ||
entries: [ | ||
options.src | ||
] | ||
}, watchify.args); | ||
debug: true | ||
}, watchify.args, options.browserify || {}); | ||
@@ -107,0 +115,0 @@ return options; |
{ | ||
"name": "gib-recipe-browserify", | ||
"version": "0.0.6", | ||
"version": "0.0.7", | ||
"description": "Gib recipe for browserify.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
4201
124
3