-
Notifications
You must be signed in to change notification settings - Fork 1
/
gulpfile.js
45 lines (37 loc) · 1.15 KB
/
gulpfile.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
40
41
42
43
44
45
'use strict';
var gulp = require('gulp');
var sass = require('gulp-sass');
var babel = require('gulp-babel');
var sym = require('gulp-sym');
var watch = require('gulp-watch');
var plumber = require('gulp-plumber');
gulp.task('compile-babel', function() {
return gulp.src('src/**/*.js')
.pipe(plumber())
.pipe(babel({plugins: ['object-assign']}))
.pipe(gulp.dest('app'));
});
gulp.task('compile-sass', function() {
gulp.src('src/stylesheets/**/*.scss')
.pipe(sass().on('error', sass.logError))
.pipe(gulp.dest('app/stylesheets'));
});
gulp.task('compile-html', function() {
gulp.src('src/index.html').pipe(gulp.dest('app'));
});
gulp.task('compile-jquery-ui', function() {
gulp.src('node_modules/jquery-ui/themes/base/images').pipe(sym('app/stylesheets/images', {force: true}));
});
gulp.task('compile-font-awesome', function() {
gulp.src('node_modules/font-awesome/fonts').pipe(sym('app/fonts', {force: true}));
});
gulp.task('compile', [
'compile-babel',
'compile-sass',
'compile-html',
'compile-jquery-ui',
'compile-font-awesome'
]);
gulp.task('watch', function() {
gulp.watch('src/**/*', ['compile']);
});