forked from bkuzmic/ion-custom-range
-
Notifications
You must be signed in to change notification settings - Fork 1
/
gulpfile.js
48 lines (42 loc) · 1.16 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
/**
* Created by kapilkumawat on 19/02/16.
*/
var gulp = require('gulp');
var gutil = require('gulp-util');
var bower = require('bower');
var concat = require('gulp-concat');
var sass = require('gulp-sass');
var minifyCss = require('gulp-minify-css');
var rename = require('gulp-rename');
var minify = require('gulp-minify');
var paths = {
sass: ['./*.scss'],
js: ['./*range.js']
};
gulp.task('default', ['sass', 'compress']);
gulp.task('compress', function() {
gulp.src(paths.js)
.pipe(minify())
.pipe(gulp.dest('./dist/'))
});
gulp.task('sass', function(done) {
gulp.src('./ion-custom-range.scss')
.pipe(sass())
.on('error', sass.logError)
.pipe(gulp.dest('.'))
.pipe(minifyCss({
keepSpecialComments: 0
}))
.pipe(rename({ extname: '.min.css' }))
.pipe(gulp.dest('./dist/'))
.on('end', done);
});
gulp.task('watch', function() {
gulp.watch(paths.sass, ['sass']);
});
gulp.task('install', function() {
return bower.commands.install()
.on('log', function(data) {
gutil.log('bower', gutil.colors.cyan(data.id), data.message);
});
});