mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-23 16:17:49 +00:00
Merge pull request #509 from suyash/mitmweb-add-sourcemap-generation
add sourcemap generation for scripts-app-dev task
This commit is contained in:
commit
ec4a6ec4e5
File diff suppressed because one or more lines are too long
@ -153,28 +153,34 @@ gulp.task("scripts-vendor-prod", function(){
|
||||
|
||||
function app_stream(debug) {
|
||||
var browserified = transform(function(filename) {
|
||||
var b = browserify(filename, {debug: debug})
|
||||
var b = browserify(filename, {debug: debug});
|
||||
_.each(vendor_packages, function(v){
|
||||
b.external(v);
|
||||
});
|
||||
b.transform(reactify);
|
||||
return b.bundle();
|
||||
});
|
||||
|
||||
return gulp.src([conf.js.app])
|
||||
.pipe(dont_break_on_errors())
|
||||
.pipe(browserified)
|
||||
.pipe(sourcemaps.init({ loadMaps: true }))
|
||||
.pipe(rename("app.js"));
|
||||
};
|
||||
}
|
||||
|
||||
gulp.task('scripts-app-dev', function () {
|
||||
return app_stream(true)
|
||||
.pipe(sourcemaps.write('./'))
|
||||
.pipe(gulp.dest(conf.static))
|
||||
.pipe(livereload({ auto: false }));
|
||||
});
|
||||
|
||||
gulp.task('scripts-app-prod', function () {
|
||||
return app_stream(true)
|
||||
.pipe(buffer())
|
||||
.pipe(uglify())
|
||||
.pipe(rev())
|
||||
.pipe(sourcemaps.write('./'))
|
||||
.pipe(save_rev())
|
||||
.pipe(gulp.dest(conf.static));
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user