forked from ClickerMonkey/SemanticUI-Angular
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gulpfile.js
42 lines (37 loc) · 1.09 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
38
39
40
41
42
'use strict';
var gulp = require('gulp');
var sourcemaps = require('gulp-sourcemaps');
var plugins = require('gulp-load-plugins')();
var pkg = require('./package.json');
var src = [
'src/sm.js',
'src/sm-core.js',
'src/*/*.js'
];
var banner = ['/**',
' * <%= pkg.name %> - <%= pkg.version %>',
' * <%= pkg.description %>',
' * ',
' * <%= pkg.homepage %>',
' * Released under the <%= pkg.license %> license.',
' * Copyright <%= (new Date()).getFullYear() %> <%= pkg.author %> and contributors.',
' */',
''].join('\n');
gulp.task('build', function () {
return gulp
.src( src )
.pipe( plugins.concat('angular-semantic-ui.js') )
.pipe( plugins.header(banner, { pkg : pkg } ))
.pipe( gulp.dest('.') );
});
gulp.task('build-min', function () {
return gulp
.src( src )
.pipe( sourcemaps.init() )
.pipe( plugins.concat('angular-semantic-ui.min.js') )
.pipe( plugins.uglify({mangle:true}) )
.pipe( sourcemaps.write('.') )
.pipe( plugins.header(banner, { pkg : pkg } ))
.pipe( gulp.dest('.') );
});
gulp.task('default', ['build', 'build-min']);