1.0.0 • Published 10 years ago
grunt-angular-eha-fixtures v1.0.0
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 ehaFixturesOptions
dest: path to write the Angular module (required)moduleName: Angular module name (default:'db')
Author
© 2015 Tom Vincent tom.vincent@ehealthnigeria.org
License
Released under the Apache-2.0 license.
1.0.0
10 years ago