-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
50 lines (45 loc) · 1.42 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
50
'use strict';
var gulp = require('gulp');
var concat = require('gulp-concat');
var uglify = require('gulp-uglify');
var sourcemaps = require('gulp-sourcemaps');
var files = {
js: [
'src/js/polyfills/*.js',
'src/js/angular/app.js',
'src/js/angular/appConfig.js',
'src/js/angular/**/*Module.js',
'src/js/angular/**/*Config.js',
'src/js/angular/**/*.js'
],
jsLib: [
'vendor/bower/angular/angular.min.js',
'vendor/bower/ng-tags-input/ng-tags-input.min.js',
'vendor/bower/moment/min/moment.min.js',
'vendor/bower/moment/locale/fr.js',
'vendor/bower/moment/locale/de.js',
'vendor/bower/moment/locale/it.js',
'vendor/bower/angular-moment/angular-moment.min.js',
'vendor/bower/lodash/dist/lodash.min.js',
'vendor/bower/jspdf/dist/jspdf.min.js',
'vendor/bower/retina.js/dist/retina.min.js'
]
};
gulp.task('js', function() {
return gulp.src(files.js)
.pipe(concat('app.min.js'))
.pipe(uglify())
.pipe(gulp.dest('build/'));
});
gulp.task('jsDev', function() {
return gulp.src(files.js)
.pipe(concat('app.min.js'))
.pipe(gulp.dest('build/'));
});
gulp.task('jsLib', function() {
return gulp.src(files.jsLib)
.pipe(sourcemaps.init({loadMaps: true}))
.pipe(concat('lib.min.js'))
.pipe(sourcemaps.write())
.pipe(gulp.dest('build/'));
});