-
Notifications
You must be signed in to change notification settings - Fork 111
Expand file tree
/
Copy pathgulpfile.babel.js
More file actions
37 lines (30 loc) · 842 Bytes
/
Copy pathgulpfile.babel.js
File metadata and controls
37 lines (30 loc) · 842 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/**
* Copyright 2015, Yahoo Inc.
* Copyrights licensed under the MIT License. See the accompanying LICENSE file for terms.
*/
import gulp from 'gulp';
import del from 'del';
import babel from 'gulp-babel';
import js from './tasks/browserify';
import lint from './tasks/lint';
gulp.task('clean', () => {
del.sync(['dist']);
del.sync(['examples/*.browserified.js']);
});
// Lint
gulp.task('lint', lint);
// Compile example
gulp.task('example', js({
src: './examples/js/index.js',
destFilename: 'main.browserified.js',
destFolder: './examples/'
}));
// Compile scripts
gulp.task('babel', () => {
return gulp.src('src/**/*')
.pipe(babel())
.pipe(gulp.dest('dist'));
});
gulp.task('dev', ['clean', 'lint', 'example']);
gulp.task('dist', ['lint', 'clean', 'babel']);
gulp.task('default', ['dev']);