forked from madbook/reddit-mobile
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.js
38 lines (28 loc) · 887 Bytes
/
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
'use strict';
require('babel/register')({
ignore: false,
only: /.+(?:(?:\.es6\.js)|(?:.jsx))$/,
extensions: ['.js', '.es6.js', '.jsx' ],
sourceMap: true,
});
/** File paths */
var build = './build';
var buildjs = build + '/js';
var buildcss = build + '/css';
var gulp = require('gulp');
var livereload = require('gulp-livereload');
var config = require('./src/config.es6.js').default;
var buildJS = require('./buildTasks/js')(gulp, buildjs);
var buildLess = require('./buildTasks/less')(gulp, buildcss)
gulp.task('less', buildLess.compile());
gulp.task('js', buildJS.compile());
gulp.task('default', ['js', 'less']);
gulp.task('watch', ['js', 'less'], function() {
var lrServer = livereload();
var reloadPage = function (evt) {
lrServer.changed(evt.path);
};
buildJS.compile(true);
buildLess.compile(true)
gulp.watch([build + '/**/*'], reloadPage);
});