-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
37 lines (31 loc) · 1.11 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
var gulp = require('gulp');
var gulpNgConfig = require('gulp-ng-config');
var del = require('del');
/**
* Tasks to create angular/frontend config files for client app
* NOTE: config filename matches name of .json file it is generated from
*/
var module_name = 'app.env.config';
var file_name = 'app.env.config.json';
var config_destination = 'src/client/app/';
// delete config file if exists.
gulp.task('clean:config', function(){
// modify if you change .json filename
var config_file_path = config_destination + 'app.env.config.js';
return del([ config_file_path ]);
});
gulp.task('config:local', function() {
gulp.src('config/local/' + file_name )
.pipe(gulpNgConfig( module_name, {wrap: true} ))
.pipe(gulp.dest( config_destination ));
});
gulp.task('config:develop', function() {
gulp.src('config/develop/' + file_name )
.pipe(gulpNgConfig( module_name, {wrap: true} ))
.pipe(gulp.dest( config_destination ));
});
gulp.task('config:prod', function() {
gulp.src('config/prod/' + file_name )
.pipe(gulpNgConfig( module_name, { wrap: true } ))
.pipe(gulp.dest( config_destination ));
});