forked from jossef/open-accessibility
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.babel.js
43 lines (36 loc) · 1.06 KB
/
gulpfile.babel.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
'use strict';
import gulp from 'gulp';
import sass from 'gulp-sass';
import babel from 'gulp-babel';
import rename from 'gulp-rename';
import autoprefixer from 'gulp-autoprefixer';
import fileinclude from 'gulp-file-include';
import cssBase64 from 'gulp-css-base64';
import uglify from 'gulp-uglify';
import cssmin from 'gulp-cssmin';
gulp.task('sass', () => {
return gulp.src('./src/**/*.scss')
.pipe(sass().on('error', sass.logError))
.pipe(cssBase64())
.pipe(autoprefixer({
browsers: ['last 2 versions'],
cascade: false
}))
.pipe(cssmin())
.pipe(rename((path)=> {
path.basename = 'open-accessability.min';
}))
.pipe(gulp.dest('./dist'));
});
gulp.task('js', () => {
return gulp.src('./src/**/*.babel.js')
.pipe(babel({
presets: ['es2015']
}))
.pipe(uglify())
.pipe(rename((path)=> {
path.basename = 'open-accessability.min';
}))
.pipe(gulp.dest('./dist'));
});
gulp.task('default', ['js', 'sass']);