ember-cli-scaffold-rapid-bootstrap
v1.1.0
Published
> Scaffolds models, routes and templates a la rails
Downloads
2
Readme
Ember-cli-scaffold
Scaffolds models, routes and templates a la rails
Installation
In your ember-cli app, do ember install ember-cli-scaffold
Usage
ember generate scaffold user first_name:string last_name:string age:number
open http://localhost:4200/users
This command generates the following files:
- app/adapters/user.js
- app/mixins/users/save-model-mixin.js
- app/routes/users/edit.js
- app/routes/users/index.js
- app/routes/users/new.js
- app/templates/users/-form.hbs
- app/templates/users/edit.hbs
- app/templates/users/index.hbs
- app/templates/users/new.hbs
- app/templates/users/show.hbs
- app/models/user.js
- app/mirage/factories/user.js
- tests/acceptance/users-test.js
These files contain all the CRUD operations and an acceptance test with all tests passing. In order to provide a fake server in both development and tests ember-cli-mirage is used.
It's also possible to generate using the pod structure, just pass the -pod
flag to scaffold generator.
Running Tests
npm test
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request