阅读(4600)
赞(10)
Gulp
2019-02-20 16:01:53 更新
Gulp是JavaScript项目构建工具。
使用gulp-sourcemaps生成Source Map:
var gulp = require('gulp');
var plugin1 = require('gulp-plugin1');
var plugin2 = require('gulp-plugin2');
var sourcemaps = require('gulp-sourcemaps');
gulp.task('javascript', function() {
gulp.src('src/**/*.js')
.pipe(sourcemaps.init())
.pipe(plugin1())
.pipe(plugin2())
.pipe(sourcemaps.write('../maps'))
.pipe(gulp.dest('dist'));
});
← Grunt