forked from Lostmyname/monkey
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.js
46 lines (38 loc) · 1.08 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
46
'use strict';
var browserSync = require('browser-sync');
var gulp = require('gulp');
var getLmnTask = require('lmn-gulp-tasks');
var jsOpts = {
src: './src/js/monkey.js',
dest: './demo/build/bundle.js'
};
var jsOptsWatch = { src: jsOpts.src, dest: jsOpts.dest, watch: true };
gulp.task('js', getLmnTask('browserify', jsOpts));
gulp.task('js-watch', getLmnTask('browserify', jsOptsWatch));
gulp.task('js-quality', getLmnTask('js-quality', {
src: './src/js/**/*.js'
}));
gulp.task('scss', getLmnTask('scss', {
src: './src/scss/*.{sass,scss}',
dest: './demo/build',
minify: false
}));
gulp.task('build', ['js', 'scss']);
gulp.task('default', ['build', 'js-watch'], function () {
var config = {
server: {
baseDir: '.'
},
startPath: '/demo/index.html'
};
browserSync.init([
'demo/build/**/*.css',
'demo/build/**/*.js',
'demo/**/*.html',
'src/imgs/**/*',
'test/**/*.js'
], config);
gulp.watch('./src/scss/**/*.{sass,scss}', ['scss']);
gulp.watch('./src/partials/partial.erb.html', ['html']);
gulp.watch('./demo/base.erb.html', ['html']);
});