-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathgulpfile.js
43 lines (37 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
var gulp = require('gulp');
var $ = require('gulp-load-plugins')();
var sassPaths = [
'bower_components/foundation-sites/scss',
'bower_components/motion-ui/src'
];
var jsPaths = [
'bower_components/jquery/dist/jquery.js',
'bower_components/what-input/what-input.js',
'bower_components/foundation-sites/dist/foundation.js',
'js/app.js'
];
gulp.task('bower', function() {
return $.run('bower install').exec();
});
gulp.task('sass', function() {
return gulp.src('scss/app.scss')
.pipe($.sass({
includePaths: sassPaths,
outputStyle: 'compressed' // if css compressed **file size**
})
.on('error', $.sass.logError))
.pipe($.autoprefixer({
browsers: ['last 2 versions', 'ie >= 9']
}))
.pipe($.rename({basename: 'brand'}))
.pipe(gulp.dest('dist'));
});
gulp.task('js', function() {
return gulp.src(jsPaths)
.pipe($.concat({path: 'brand.js', stat: {mode: 0666}}))
.pipe(gulp.dest('dist'));
});
gulp.task('default', ['sass', 'js'], function() {
gulp.watch(['scss/**/*.scss'], ['sass']);
gulp.watch(['js/**/*.js'], ['js']);
});