-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathgulpfile.js
55 lines (47 loc) · 1.22 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
47
48
49
50
51
52
53
54
55
/* Vars */
var gulp = require('gulp'),
cssmin = require('gulp-cssmin'),
concat = require('gulp-concat'),
autoprefixer = require('gulp-autoprefixer'),
stylus = require('gulp-stylus');
/* Sources */
var src_path = 'sources/';
var src_stylus = src_path + '**/*.styl';
/* Destination folder */
var DEST = 'dist/';
/* Other */
var browsers_ver = ['not ie <= 9', 'iOS > 7'];
/* Tasks */
gulp.task('default', ['build', 'watch']);
gulp.task('build', [
'buildStylus'
]);
// Watch Files For Changes
gulp.task('watch', function () {
//watch sources
gulp.watch(src_stylus, ['reloadStylus']);
});
/* -------------------- Stylus */
//Reload
gulp.task('reloadStylus', function () {
gulp.src(src_stylus)
.pipe(stylus())
.pipe(autoprefixer({
browsers: browsers_ver,
cascade: false
}))
.pipe(concat("flexboxgrid-helpers.css"))
.pipe(gulp.dest(DEST))
});
//Build
gulp.task('buildStylus', function () {
gulp.src(src_stylus)
.pipe(stylus())
.pipe(autoprefixer({
browsers: browsers_ver,
cascade: false
}))
.pipe(cssmin())
.pipe(concat("flexboxgrid-helpers.min.css"))
.pipe(gulp.dest(DEST))
});