Skip to content
This repository has been archived by the owner on Jan 12, 2024. It is now read-only.

Commit

Permalink
gulpfile refactor build stream,
Browse files Browse the repository at this point in the history
set process to undefined
  • Loading branch information
hmdhk committed Jun 2, 2016
1 parent f433894 commit bdaa496
Showing 1 changed file with 2 additions and 14 deletions.
16 changes: 2 additions & 14 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ function createBuildStream(mainFilePath) {
return browserify({
entries: [mainFilePath],
standalone: '',
insertGlobalVars: { define: function () { return 'undefined'; } }
insertGlobalVars: { define: function () { return 'undefined'; }, process: function () { return 'undefined'; } }
})
.bundle()
.pipe(source(mainFilePath))
Expand Down Expand Up @@ -115,19 +115,7 @@ gulp.task('build', function () {
]

var tasks = sourceTargets.map(function (entry) {
return browserify({
entries: [entry],
standalone: '',
insertGlobalVars: { define: function () { return 'undefined'; } }
})
.bundle()
.pipe(source(entry))
.pipe(rename({ dirname: '' }))
.pipe(buffer())
.pipe(injectVersion({
replace: new RegExp(RegExp.escape('%%VERSION%%'), 'g')
}))
.pipe(derequire())
return createBuildStream(entry)
.pipe(gulp.dest('./dist/dev/'))
.pipe(rename({
extname: '.min.js'
Expand Down

0 comments on commit bdaa496

Please sign in to comment.