- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgulpfile.js
More file actions
Latest commit
46 lines (41 loc) · 1.38 KB
/
Copy pathgulpfile.js
File metadata and controls
46 lines (41 loc) · 1.38 KB
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
vargulp=require('gulp');
varsass=require('gulp-sass');
varrename=require('gulp-rename');
varcleanCSS=require('gulp-clean-css');
varautoprefixer=require('gulp-autoprefixer');
vardel=require('del');
varheader=require('gulp-header');
varpkg=require('./package.json');
varbanner=['/*!',
' * <%= pkg.name %> <%= pkg.version %> (http://javatmp.com)',
' * <%= pkg.description %>',
' *',
' * @link <%= pkg.homepage %>',
' * @copyright 2018 JavaTMP',
' * @license <%= pkg.license %>',
' */',
''].join('\n');
gulp.task('delete-css',function(cb){
returndel.sync(['./dist/**/*'],cb());
});
gulp.task('sass',gulp.series("delete-css",function(cb){
returngulp.src([
'./src/bootstrap-foundation.scss',
'./src/bootstrap-reverse.scss',
'./src/bootstrap-ltr-extender.scss',
'./src/bootstrap-extender.scss'
])
.pipe(sass().on('error',sass.logError))
.pipe(autoprefixer({
browsers: ['last 2 versions'],
cascade: false
}))
.pipe(header(banner,{pkg: pkg}))
.pipe(cleanCSS())
.pipe(rename({suffix: '.min'}))
.pipe(gulp.dest('./dist/'));
}));
gulp.task('default',gulp.series("sass",function(cb){
// place code for your default task here
cb();
}));