grunt-angular-eha-fixtures
v1.0.0
Published
Generates a fixture collections map
Downloads
1
Readme
grunt-angular-eha-fixtures
Generates a fixture collections map
Turns a list of JSON files:
❯ tree fixtures
fixtures
└── my-collection.json
… into an Angular constant:
angular.module('db', [])
.constant('collections', {
MY_COLLECTION: 'my-collection'
});
Usage
Add something like the following to your Gruntfile:
ehaFixtures: {
all: {
options: {
dest: '<%= yeoman.app %>/scripts/db.js'
},
files: [
{
expand: true,
src: '<%= yeoman.app %>/scripts/fixtures/*.json'
}
]
}
}
… and run it:
❯ grunt ehaFixtures
Options
dest
: path to write the Angular module (required)moduleName
: Angular module name (default:'db'
)
Author
© 2015 Tom Vincent [email protected]
License
Released under the Apache-2.0 license.