forked from robisim74/angular-l10n
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.js
49 lines (37 loc) · 1.17 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
43
44
45
46
47
48
49
// Plug-ins.
var gulp = require('gulp'),
del = require('del');
// Script paths.
var path = require("path"),
dest = 'bundles';
// SystemJS Build Tool.
var Builder = require('systemjs-builder');
var builder = new Builder();
var config = {
baseURL: path.baseURL,
defaultJSExtensions: true,
map: {
'@angular': 'node_modules/@angular',
'rxjs': 'node_modules/rxjs'
},
paths: {
'angular2localization/*': '*.js',
},
meta: {
'node_modules/@angular/*': { build: false },
'node_modules/rxjs/*': { build: false }
}
};
builder.config(config);
// Clean task: cleans the contents of the bundles directory.
gulp.task('clean', function () {
return del(dest);
});
// Bundles task: creates files.
gulp.task('bundles', ['clean'], function () {
// Creates js file.
builder.bundle('angular2localization/angular2localization', dest + '/angular2localization.js', { minify: false, sourceMaps: false });
// Creates minified js file.
builder.bundle('angular2localization/angular2localization', dest + '/angular2localization.min.js', { minify: true, sourceMaps: false });
});
gulp.task('default', ['bundles']);