forked from gaearon/react-dnd-touch-backend
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.babel.js
39 lines (32 loc) · 932 Bytes
/
gulpfile.babel.js
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
38
39
/**
* 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 { default as js, dist } from './tasks/browserify';
gulp.task('clean', () => {
del.sync(['dist']);
del.sync(['examples/*.browserified.js']);
});
// Compile example
gulp.task('js-dev', js({
src: './examples/js/index.jsx',
destFilename: 'main.browserified.js',
destFolder: './examples/'
}));
// Compile scripts
gulp.task('js-browserify', dist({
src: './src/Touch.js',
destFilename: 'Touch.browserified.js',
destFolder: './dist/'
}));
gulp.task('babel', () => {
return gulp.src('src/**/*')
.pipe(babel())
.pipe(gulp.dest('dist'));
});
gulp.task('dev', ['clean', 'js-dev']);
gulp.task('dist', ['clean', 'babel', 'js-browserify']);
gulp.task('default', ['dev']);