@triptyk/ember-addon-boilerplate
Addon that help you to generate base component/route/test/changeset/validation depending of what you need
Compatibility
- Ember.js v3.28 or above
- Ember CLI v3.28 or above
- Node.js v14 or above
Installation
ember install @triptyk/ember-blueprint
Usage
Be careful to use the plural form of the name of the blueprint
Generate entity
Be careful to use the plural form of the name of the blueprint
ember g entity dashboard/users
When you generate an entity those files will be generate:
Global
- app/changesets/user.ts
- app/validations/user.ts
- app/models/user.ts
- app/services/user.ts
Routes
- app/dashboard/users/template.hbs
app/dashboard/users/route.ts - app/dashboard/users/create/template.hbs
app/dashboard/users/create/route.ts - app/dashboard/users/edit/template.hbs
app/dashboard/users/edit/route.ts - app/dashboard/users/index/template.hbs
app/dashboard/users/index/route.ts
Components
- app/components/forms/user/template.hbs
app/components/forms/user/component.ts - app/components/pages/dashboard/users/template.hbs
- app/components/pages/dashboard/users/base/template.hbs
app/components/pages/dashboard/users/base/component.ts - app/components/pages/dashboard/users/create/template.hbs
app/components/pages/dashboard/users/create/component.ts - app/components/pages/dashboard/users/edit/template.hbs
app/components/pages/dashboard/users/edit/component.ts - app/components/tables/users/template.hbs
app/components/tables/users/component.ts - app/components/tables/user/content/template.hbs
app/components/tables/user/content/component.ts
Tests
- tests/acceptance/dashboard/users/main-test.ts
- tests/integrations/components/forms/user/component-test.ts
- tests/pages/forms/user.ts
- tests/pages/pages/dashboard/users/create.ts
- tests/pages/pages/dashboard/users/edit.ts
- tests/pages/pages/dashboard/users/index.ts
- tests/pages/tables/user.ts
Generate page
Be careful to use the plural form of the name of the blueprint
ember g page dashboard/users
When you generate an entity those files will be generate:
Routes
- app/dashboard/user/template.hbs
app/dashboard/users/route.ts
Components
- app/components/pages/dashboard/users/template.hbs
app/components/pages/dashboard/users/component.ts
Tests
- tests/acceptance/dashboard/users/main-test.ts
- tests/pages/pages/dashboard/users/index.ts
Generate form
ember g form user
When you generate an entity those files will be generate:
Global
- app/changesets/user.ts
- app/validations/user.ts
Components
- app/components/forms/user/template.hbs
app/components/forms/user/component.ts
Tests
- tests/integrations/components/forms/user/component-test.ts
- tests/pages/forms/user.ts
Contributing
See the Contributing guide for details.
License
This project is licensed under the MIT License.