-
Notifications
You must be signed in to change notification settings - Fork 43
Expand file tree
/
Copy pathgulpfile.js
More file actions
executable file
·36 lines (30 loc) · 875 Bytes
/
gulpfile.js
File metadata and controls
executable file
·36 lines (30 loc) · 875 Bytes
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');
var $ = require('gulp-load-plugins')();
var pkg = require('./package.json');
var banner = ['/**',
' * <%= pkg.name %> - <%= pkg.description %>',
' * @version v<%= pkg.version %>',
' * @link <%= pkg.homepage %>',
' * @license <%= pkg.license %>',
' */',
''].join('\n');
gulp.task('minify-css', function () {
return gulp.src('jquery.restable.css')
.pipe($.csso())
.pipe($.rename({suffix: '.min'}))
.pipe($.header(banner, {pkg:pkg}))
.pipe(gulp.dest(''))
.pipe($.size());
});
gulp.task('minify-js', function () {
return gulp.src('jquery.restable.js')
.pipe($.jshint())
.pipe($.jshint.reporter('jshint-stylish'))
.pipe($.uglify())
.pipe($.rename({suffix: '.min'}))
.pipe($.header(banner, {pkg:pkg}))
.pipe(gulp.dest(''))
.pipe($.size());
});
gulp.task('default', ['minify-css', 'minify-js']);