-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathgulpfile.js
More file actions
40 lines (36 loc) · 1.1 KB
/
gulpfile.js
File metadata and controls
40 lines (36 loc) · 1.1 KB
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
var gulp = require('gulp');
var concat = require('gulp-concat');
var sass = require('gulp-sass');
var cssmin = require('gulp-cssmin');
var postcss = require('gulp-postcss');
var autoprefixer = require('autoprefixer');
function reportChange(event) {
console.log('File ' + event.path + ' was ' + event.type + ', running tasks...');
}
/**
* Build the main css file.
*/
gulp.task('build-css', function () {
gulp.src('src/assets/array.scss')
.pipe(sass().on('error', sass.logError))
.pipe(postcss([ autoprefixer({
browsers: [
'Firefox >= 5',
'Chrome >= 10',
'Explorer >= 8',
'iOS >= 8',
'ChromeAndroid >= 41',
'FirefoxAndroid >= 40'
]
}) ]))
.pipe(cssmin())
.pipe(concat('array.min.css'))
.pipe(gulp.dest('src/assets'));
});
gulp.task('watch', ['default'], function () {
gulp.watch('src/assets/**/*.scss', ['build-css']).on('change', reportChange);
});
/**
* Execute all assets tasks.
*/
gulp.task('default', ['build-css'], function () {});