-
Notifications
You must be signed in to change notification settings - Fork 7
/
gulpfile.js
38 lines (33 loc) · 851 Bytes
/
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
var gulp = require('gulp');
var path = require('path');
var minifyCSS = require('gulp-csso');
var less = require('gulp-less');
var concat = require('gulp-concat');
var sourcemaps = require('gulp-sourcemaps');
gulp.task('css-min', function() {
return gulp
.src('src/**/*.less')
.pipe(less({
paths: [ path.join(__dirname, 'less', 'includes') ]
}))
.pipe(minifyCSS())
.pipe(concat('CoolRoadmap.min.css'))
.pipe(gulp.dest('dist/'));
});
gulp.task('js-min', function() {
return gulp
.src('src/**/*.js')
.pipe(concat('CoolRoadmap.min.js'))
.pipe(gulp.dest('dist/'));
});
gulp.task('watch', function() {
return gulp.watch('src/**/*', ['build']);
})
gulp.task('build', [
'css-min',
'js-min'
]);
gulp.task('default', [
'build',
'watch'
]);