forked from MakG10/jquery-meme-generator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
28 lines (23 loc) · 801 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
var gulp = require('gulp');
var uglify = require('gulp-uglify');
var less = require('gulp-less');
var cleanCSS = require('gulp-clean-css');
var gutil = require('gulp-util');
var rename = require('gulp-rename');
gulp.task('default', ['build']);
gulp.task('build', ['styles', 'scripts']);
gulp.task('styles', function() {
gulp.src('./src/less/jquery.memegenerator.less')
.pipe(less())
.pipe(gulp.dest('./src/css'));
gulp.src('src/css/jquery.memegenerator.css')
.pipe(cleanCSS().on('error', gutil.log))
.pipe(rename({suffix: '.min'}))
.pipe(gulp.dest('./dist/'));
});
gulp.task('scripts', function() {
gulp.src('src/js/jquery.memegenerator.js')
.pipe(uglify({preserveComments: 'license'}).on('error', gutil.log))
.pipe(rename({suffix: '.min'}))
.pipe(gulp.dest('./dist/'));
});