-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
38 lines (31 loc) · 904 Bytes
/
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
var gulp = require('gulp');
var exec = require('child_process').exec;
var path = require('path');
var env = process.env.NODE_ENV || 'development';
var config = {
restApi: {
development: 'http://localhost:3001',
staging: '',
production: ''
}
}
gulp.task('default', ['ng']);
gulp.task('ng', function (cb) {
var url;
switch (env) {
case 'development':
url = config.restApi.development;
break;
case 'staging':
url = config.restApi.staging;
break;
case 'production':
url = config.restApi.production;
break;
}
exec('cd node_modules/.bin && lb-ng -u ' + url + ' ../../server/server.js ../../client/lb-services.module.js', function (err, stdout, stderr) {
console.log(stdout);
console.log(stderr);
cb(err); // finished task
});
});