-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgulpfile.js
More file actions
49 lines (43 loc) · 1.4 KB
/
gulpfile.js
File metadata and controls
49 lines (43 loc) · 1.4 KB
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
40
41
42
43
44
45
46
47
48
49
var gulp = require('gulp');
var babel = require('gulp-babel');
var spawn = require('child_process').spawn;
// all this file is doing is transpiling the jsx files in src/ into js files in dist/
gulp.task('entrypoint', () => {
return gulp.src('src/entrypoint.jsx')
.pipe(babel({
plugins: ['transform-react-jsx']
}))
.pipe(gulp.dest('dist/'));
});
gulp.task('image-choice-screen', () => {
return gulp.src('src/image_choice_screen/*.jsx')
.pipe(babel({
plugins: ['transform-react-jsx']
}))
.pipe(gulp.dest('dist/image_choice_screen/'));
});
gulp.task('scene-selection-screen', () => {
return gulp.src('src/scene_selection_screen/*.jsx')
.pipe(babel({
plugins: ['transform-react-jsx']
}))
.pipe(gulp.dest('dist/scene_selection_screen/'));
});
gulp.task('output-screen', () => {
return gulp.src('src/output_screen/*.jsx')
.pipe(babel({
plugins: ['transform-react-jsx']
}))
.pipe(gulp.dest('dist/output_screen/'));
});
gulp.task('control', () => {
return gulp.src('src/control/*.jsx')
.pipe(babel({
plugins: ['transform-react-jsx']
}))
.pipe(gulp.dest('dist/control/'));
});
gulp.task('transpile',
gulp.parallel('entrypoint', 'image-choice-screen', 'scene-selection-screen', 'output-screen', 'control'),
(done) => done()
);