-
Notifications
You must be signed in to change notification settings - Fork 28
/
gulpfile.js
37 lines (31 loc) · 1.01 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
var gulp = require('gulp'),
concat = require('gulp-concat'),
cleanCSS = require('gulp-clean-css'),
uglify = require('gulp-uglify'),
less = require('gulp-less'),
rename = require('gulp-rename');
var src = 'src/', dist = 'dist/';
function compileCss() {
return gulp.src(src + '/less/main.less')
.pipe(less())
.pipe(rename('jquery.floating-social-share.css'))
.pipe(gulp.dest(src));
};
function minifyCss() {
return gulp.src(src + 'jquery.floating-social-share.css')
.pipe(concat('jquery.floating-social-share.min.css'))
.pipe(cleanCSS({compatibility: 'ie8'}))
.pipe(gulp.dest(dist));
};
function minifyJs() {
return gulp.src(src + 'jquery.floating-social-share.js')
.pipe(concat('jquery.floating-social-share.min.js'))
.pipe(uglify({mangle: false}))
.pipe(gulp.dest(dist));
};
var build = gulp.series(compileCss, minifyCss, minifyJs);
exports.compileCss = compileCss;
exports.minifyCss = minifyCss;
exports.minifyJs = minifyJs;
exports.build = build;
exports.default = build;