atticoos / gulp-ng-config

:wrench: Create AngularJS constants from a JSON config file
MIT License
173 stars 35 forks source link

allow more control over output file #34

Closed parliament718 closed 9 years ago

parliament718 commented 9 years ago

  gulp.src('config/local.json')
    .pipe(extend('config/defaults.json'))
    .pipe(ngConfig('config-module'))
    .pipe(gulp.dest("app/"));

I use gulp-extend because I need to extend defaults.json with local.json AND THEN pipe it into ngConfig.

However, the output file created is:

app/config/defaults.js

Whereas I need it to output

app/config.js

Can we please get more control over the file name (it's not necessarily the same as the json file name) and well as not creating the extra config folder (since gulp.dest is already specified it should output there directly).

atticoos commented 9 years ago

Can't you pipe gulp-rename before the output?

parliament718 commented 9 years ago

Didn't know about that one. Thanks, it worked.