-
Notifications
You must be signed in to change notification settings - Fork 36
/
gulpfile.js
39 lines (34 loc) · 960 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
39
var gulp = require('gulp');
var concat = require('gulp-concat');
var pump = require('pump');
var mainBowerFiles = require('gulp-main-bower-files');
var minify = require('gulp-clean-css');
var rename = require('gulp-rename');
var uglify = require('gulp-uglify');
gulp.task('css', function(cb) {
pump([
gulp.src('./bower.json'),
mainBowerFiles('**/*.css'),
concat('ng-croppie.css'),
gulp.dest('./')
], cb);
});
gulp.task('css-minify', function(cb) {
pump([
gulp.src('./bower.json'),
mainBowerFiles('**/*.css'),
concat('ng-croppie.css'),
rename({suffix: '.min'}),
minify({compatibility: 'ie11', keepBreaks: true}),
gulp.dest('./')
], cb);
});
gulp.task('js', function(cb) {
pump([
gulp.src('ng-croppie.js'),
rename({suffix: '.min'}),
uglify(),
gulp.dest('./')
], cb);
});
gulp.task('default', ['css', 'css-minify', 'js']);