Blueprint Addon for Ember Components that have inline templates.
Uses the wonderful ember-cli-htmlbars-inline-precompile addon behind the scenes.
ember install ember-inline-component
ember g inline-component my-component
ember g inline-component --pod another-one
This creates a component file that looks like:
import Component from '@ember/component';
import hbs from 'htmlbars-inline-precompile';
export default Component.extend({
layout: hbs`{{yield}}`
});
So you can build components with the template inside the source itself, skipping the template.hbs
file.
Great for prototyping, and fast development. Can always be moved to a separate template file if your template gets big.
Also works when generating inside an addon.
Note that the excellent ember-template-lint
project is extremely helpful for finding lint errors in handlebars files, but will
not examine template literals natively in .js
files. However, it is possible to use
eslint
along with this eslint plugin
to provide linting for your handlebars template literals within your .js
files.
If you see any issues, please submit an Issue, or a Pull Request if you can.
See CONTRIBUTING.md.
This project is licensed under the MIT License.