-
Notifications
You must be signed in to change notification settings - Fork 22
Expand file tree
/
Copy pathgulpfile.js
More file actions
33 lines (29 loc) · 762 Bytes
/
gulpfile.js
File metadata and controls
33 lines (29 loc) · 762 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
var gulp = require('gulp');
var uglify = require('gulp-uglify');
var rename = require('gulp-rename');
var header = require('gulp-header');
var pkg = require('./package.json');
var banner = [
'/**',
' * <%= pkg.name %> - <%= pkg.description %>',
' *',
' * @version <%= pkg.version %>',
' * @link <%= pkg.homepage %>',
' * @author <%= pkg.author %>',
' * @license <%= pkg.license %>',
' */\n'
].join('\n');
var paths = {
scripts: './blankshield.js',
dist: './'
};
gulp.task('minify', function() {
gulp.src(paths.scripts)
.pipe(uglify())
.pipe(header(banner, {pkg: pkg}))
.pipe(rename(function(path) {
path.basename += '.min';
}))
.pipe(gulp.dest(paths.dist));
});
gulp.task('dist', ['minify']);