The plugin to wrap json
fixtures as an angular value
See here
npm install gulp-ng-json2js
var gulp=require('gulp');
var json2js=require('gulp-ng-json2js');
var concat=require('gulp-concat');
gulp.task('fixtures',function(){
return gulp.src('./test/fixtures/**/*.json')
.pipe(json2js({
moduleName:'app.fixtures'
}))
.pipe(concat('fixtures.js'))
.pipe(gulp.dest('./build/'));
});
Type: Sting
Default: json
The name of the generated AngularJS module.
Type: String
The prefix which should be prepended to the file path to generate the file url.
Type: String
Default: Value
The postfix which should be append to the value name.
Type: String
The prefix which should be subtracted from the file path to generate the file url.
Type: Function
A function that allows the generate file url to be manipulated. For example:
function (url) {
return url.replace('.json', '');
}
AND
gulp fixtures
npm test