Skip to content

Commit c6dd41b

Browse files
committed
Minor refactoring to transpile task
- Transpiling is now gulp transpile - Default redirects to transpile - Refactor transpile output directory to a separate constant - Work by @YijinL in @05ad308
1 parent 0f14312 commit c6dd41b

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

gulpfile.js

+6-2
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,15 @@ var help = require('gulp-task-listing');
66

77
gulp.task('help', help);
88

9+
gulp.task('default', ['transpile']);
10+
11+
const TRANSPILE_DEST_DIR = './dist';
12+
913
// By default, individual js files are transformed by babel and exported to /dist
10-
gulp.task("default", function () {
14+
gulp.task('transpile', function () {
1115
return gulp.src("lib/*.js")
1216
.pipe(babel({ "presets": ["es2015"] }))
13-
.pipe(gulp.dest("dist"));
17+
.pipe(gulp.dest(TRANSPILE_DEST_DIR));
1418
});
1519

1620
gulp.task('test', function(){

0 commit comments

Comments
 (0)