guzart / gulp-ng-constant

Gulp plugin for dynamic generation of angular constant modules.
MIT License
109 stars 26 forks source link

specifying deps in config.json is not getting retrieved #4

Closed mariuskubilius closed 10 years ago

mariuskubilius commented 10 years ago

my config.json file is: { "name": "mgApp", "deps": ["ui.router", "ngResource"], "constants": { "API_PATH": "http://localhost:3000/" } }

and the file returned after running gulp task:

angular.module("mgApp", [])

.constant("API_PATH", "http://localhost:3000/")

;

While defying in task it returns file with dependencies.

guzart commented 10 years ago

Hi, what does the code in the gulpfile.js looks like?

mariuskubilius commented 10 years ago
gulp.task('set-config', function(){
    return gulp.src(config.appPath + 'config' + env + '.json')
        .pipe(ngConstant())
        .pipe(gulp.dest(config.tmpPath + 'constants'));
});
guzart commented 10 years ago

this was fixed in the master branch, so I just publish the changes into 0.1.1. Thank you.