Run prettier
This commit is contained in:
53
Gulpfile.js
53
Gulpfile.js
@@ -21,32 +21,41 @@ function swapSrcWithLib(srcPath) {
|
||||
|
||||
gulp.task("default", ["build"]);
|
||||
|
||||
gulp.task("build", function () {
|
||||
return gulp.src(scripts, { base: base })
|
||||
.pipe(plumber({
|
||||
errorHandler: function (err) {
|
||||
gutil.log(err.stack);
|
||||
},
|
||||
}))
|
||||
.pipe(newer({
|
||||
dest: base,
|
||||
map: swapSrcWithLib,
|
||||
}))
|
||||
.pipe(through.obj(function (file, enc, callback) {
|
||||
gutil.log("Compiling", "'" + chalk.cyan(file.relative) + "'...");
|
||||
callback(null, file);
|
||||
}))
|
||||
gulp.task("build", function() {
|
||||
return gulp
|
||||
.src(scripts, { base: base })
|
||||
.pipe(
|
||||
plumber({
|
||||
errorHandler: function(err) {
|
||||
gutil.log(err.stack);
|
||||
},
|
||||
})
|
||||
)
|
||||
.pipe(
|
||||
newer({
|
||||
dest: base,
|
||||
map: swapSrcWithLib,
|
||||
})
|
||||
)
|
||||
.pipe(
|
||||
through.obj(function(file, enc, callback) {
|
||||
gutil.log("Compiling", "'" + chalk.cyan(file.relative) + "'...");
|
||||
callback(null, file);
|
||||
})
|
||||
)
|
||||
.pipe(babel())
|
||||
.pipe(through.obj(function (file, enc, callback) {
|
||||
// Passing 'file.relative' because newer() above uses a relative path and this keeps it consistent.
|
||||
file.path = path.resolve(file.base, swapSrcWithLib(file.relative));
|
||||
callback(null, file);
|
||||
}))
|
||||
.pipe(
|
||||
through.obj(function(file, enc, callback) {
|
||||
// Passing 'file.relative' because newer() above uses a relative path and this keeps it consistent.
|
||||
file.path = path.resolve(file.base, swapSrcWithLib(file.relative));
|
||||
callback(null, file);
|
||||
})
|
||||
)
|
||||
.pipe(gulp.dest(base));
|
||||
});
|
||||
|
||||
gulp.task("watch", ["build"], function () {
|
||||
watch(scripts, { debounceDelay: 200 }, function () {
|
||||
gulp.task("watch", ["build"], function() {
|
||||
watch(scripts, { debounceDelay: 200 }, function() {
|
||||
gulp.start("build");
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user