forked from joernweissenborn/lcars
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.js
70 lines (61 loc) · 1.49 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
'use strict';
// change this variable to show / hide errors
var ENVIRONMENT = 'development' // 'production'
, gulp = require('gulp')
, stylus = require('gulp-stylus')
, minify = require('gulp-minify-css')
, rename = require('gulp-rename')
, nib = require('nib')
, rupture = require('rupture')
, paths = {
coreFiles: './lcars/stylus/*.styl'
};
gulp.task('compile-dev', function(done) {
gulp.src('./lcars/stylus/lcars_devel.styl')
.pipe(
stylus({
errors: (ENVIRONMENT==='development'),
use: [
nib(),
rupture()
]
})
)
.pipe( rename('lcars.devel.css') )
.pipe( gulp.dest('./lcars/css') );
done();
});
gulp.task('compile', function(done) {
gulp.src('./lcars/stylus/lcars.styl')
.pipe(
stylus({
errors: (ENVIRONMENT==='development'),
use: [
nib(),
rupture()
]
})
)
.pipe( gulp.dest('./lcars/css') );
done();
});
gulp.task('compile-build', function(done) {
gulp.src('./lcars/stylus/lcars.styl')
.pipe(
stylus({
errors: (ENVIRONMENT==='development'),
use: [
nib(),
rupture()
]
})
)
.pipe( minify() )
.pipe( rename('lcars.min.css') )
.pipe( gulp.dest('./lcars/css') );
done();
});
gulp.task('watch', function() {
gulp.watch(paths.coreFiles, gulp.parallel(['compile-dev']));
});
gulp.task('default', gulp.parallel(['compile-dev', 'compile','compile-build']));