-
Notifications
You must be signed in to change notification settings - Fork 16
/
gulpfile.js
45 lines (40 loc) · 1.09 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
var gulp = require('gulp'),
stylus = require('gulp-stylus'),
prefix = require('gulp-autoprefixer'),
uglify = require('gulp-uglify'),
concat = require('gulp-concat');
var paths = {
styles: 'css/**/*.styl',
scripts: [
'js/modules/core.js',
'js/modules/accordion.js',
'js/modules/dropdown-nav.js',
'js/modules/modal.js',
'js/modules/off-canvas.js',
'js/modules/tabs.js',
'js/modules/toggle.js'
]
};
gulp.task('styles', function () {
gulp.src('css/barekit.styl')
.pipe(stylus())
.pipe(prefix('last 2 version', 'ie 8', 'ie 9'))
.pipe(gulp.dest('./css'))
});
gulp.task('scripts', function () {
gulp.src(paths.scripts)
.pipe(concat('barekit.min.js'))
.pipe(uglify())
.pipe(gulp.dest('./js'));
});
gulp.task('watch', function () {
gulp.watch(paths.styles, ['styles']);
gulp.watch(paths.scripts, ['scripts']);
gulp.watch(paths.html, ['html']);
});
// The default task (called when you run `gulp` from cli)
gulp.task('default', [
'styles',
'scripts',
'watch'
]);