guzart/gulp-ng-constant — pull request #9 by lukehorvat (2014-11-03 16:41:22+00:00)
Title: Vinyl adapter option

It seems to me that this gulp plugin should be completely usable without a physical file to source the constants from, because you can pass an object via the `constants` option. But the current setup doesn't really allow it.

I've added a `noFile` option that allows the plugin to act as a vinyl adapter, meaning it can be used in place of `gulp.src`. For example:

```javascript
var gulp = require('gulp');
var ngConstant = require('gulp-ng-constant');
var uglify = require('gulp-uglify');
var constants = { hello: 'world' };

gulp.task('config', function () {
return ngConstant({name: 'my.module.config', constants: constants, noFile: true})
.pipe(uglify())
.pipe(gulp.dest('dist'));
});
```

The default outputted filename will be `constants.js`.