-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
gulpfile.js
36 lines (33 loc) · 1 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
'use strict';
var gulp = require('gulp'),
sass = require('gulp-sass'),
autoprefixer = require('gulp-autoprefixer'),
gulpCssGlobbing = require("gulp-css-globbing"),
cssmin = require('gulp-cssmin'),
uglify = require('gulp-uglify'),
concat = require('gulp-concat');
gulp.task('compile', function () {
// Compile JS.
gulp.src('./src/ripple-effect.js')
.pipe(concat('ripple-effect.min.js'))
.pipe(uglify({
output: {
quote_style: 3
}
}).on('error', function (e) {
console.log(e);
}))
.pipe(gulp.dest('./dist/js/'));
// Compile SaSS.
gulp.src('./src/ripple-effect.scss')
.pipe(gulpCssGlobbing({
extensions: ['.scss']
}))
.pipe(sass().on('error', sass.logError))
.pipe(autoprefixer({
browsers: ['last 2 version']
}))
.pipe(cssmin())
.pipe(concat('ripple-effect.min.css'))
.pipe(gulp.dest('./dist/css/'));
});