-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgulpfile.js
More file actions
32 lines (25 loc) · 750 Bytes
/
gulpfile.js
File metadata and controls
32 lines (25 loc) · 750 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
'use strict';
const gulp = require('gulp');
const elm = require('gulp-elm');
const sass = require('gulp-sass');
gulp.task('elm-init', elm.init);
gulp.task('elm', ['elm-init'], () => {
return gulp.src('src/*.elm')
.pipe(elm({ filetype: 'js' }))
.pipe(gulp.dest('dist/js/'));
});
gulp.task('sass', () => {
return gulp.src('./src/scss/**/*.scss')
.pipe(sass().on('error', sass.logError))
.pipe(gulp.dest('./dist/css/'));
});
gulp.task('js', () => {
return gulp.src('./src/*.js')
.pipe(gulp.dest('./dist/js/'));
});
gulp.task('watch', function () {
gulp.watch('./src/*.elm', ['elm']);
gulp.watch('./src/scss/**/*.scss', ['sass']);
gulp.watch('./src/*/*.js', ['js']);
});
gulp.task('build', ['elm', 'sass', 'js']);