Hi there,
I am currently using the gulp-ng-constant module as follows:
ngConstants = require('gulp-ng-constant');
gulp.task('create-version-file', [], function () {
var constants = { version: '1.0.0' };
return ngConstant({
constants: constants,
wrap: false,
deps: [],
stream: true,
name: 'myapp.version'
})
.pipe(gulp.dest('dist'))
});
However, doing so, creates an Angular constants file named ngConstants.js. Forcing a filename in gulp.dest by specifying a full path, as in gulp.dest('dist/version.js') creates a directory called version.js (which contains the generated ngConstants.js file) inside the dist directory.
No option seems to exist to specify the filename of the generated constants file. Is it so, or am I missing something in the docs?
Thanks in advance!
Hi there,
I am currently using the
gulp-ng-constantmodule as follows:However, doing so, creates an Angular constants file named
ngConstants.js. Forcing a filename ingulp.destby specifying a full path, as ingulp.dest('dist/version.js')creates a directory calledversion.js(which contains the generatedngConstants.jsfile) inside thedistdirectory.No option seems to exist to specify the filename of the generated constants file. Is it so, or am I missing something in the docs?
Thanks in advance!