Skip to content

Setting a custom filename for the outputted file via options? #46

Description

@nick13jaremek

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions