https://github.com/alexlafroscia/ember-cli-stencil
Automatic discovery of Stencil.js components for your Ember application
https://github.com/alexlafroscia/ember-cli-stencil
ember-cli stenciljs web-components
Last synced: 12 months ago
JSON representation
Automatic discovery of Stencil.js components for your Ember application
- Host: GitHub
- URL: https://github.com/alexlafroscia/ember-cli-stencil
- Owner: alexlafroscia
- Created: 2018-04-10T18:42:15.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2022-12-10T20:32:52.000Z (over 3 years ago)
- Last Synced: 2025-04-23T21:08:14.966Z (about 1 year ago)
- Topics: ember-cli, stenciljs, web-components
- Language: JavaScript
- Homepage:
- Size: 1.17 MB
- Stars: 25
- Watchers: 3
- Forks: 7
- Open Issues: 31
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ember-cli-stencil
[](https://travis-ci.org/alexlafroscia/ember-cli-stencil)
[](https://www.npmjs.com/package/ember-cli-stencil)
[](https://stenciljs.com)
> Automatic discovery of [Stencil.js][stencil] components for your Ember application
Stencil provides a great, opinionated process for defining Web Components (custom elements) using TypeScript and JSX. This addon leverages the conventions of Stencil and the Ember CLI respectively to automatically discover Stencil components in your dependencies and pull them into your application without any further configuration needed!
## Installation
Start by installing your Stencil components as `npm` modules, as described in the [distribution instructions][distribution] in the guide. Then, install this addon:
```bash
ember install ember-cli-stencil ember-auto-import
```
That's it! Your Stencil components will automatically be detected by the addon and pulled into your application.
**Note:** `ember-auto-import` is _required_ for this addon to work correctly.
## Usage
Since Stencil components are detected automatically, you can just start using any Stencil components discovered in your dependencies without any further configuration required. Props can be passed to them, just like other elements, and events listened to through the [`{{on}}` modifier][on-modifier].
```hbs
Rendering into the slot
```
## Debugging
If the build seems slow, or you think there are packages missing, you can log some debugging information like so:
```bash
DEBUG=ember-cli-stencil:* ember serve
```
This will report:
- Which dependencies were discovered to be Stencil collections
- The configuration used for the addon
If there are any issues around judging a file to be a Stencil collection incorrectly or importing the wrong files, please [file an issue][issues].
[stencil]: https://stenciljs.com/
[distribution]: https://stenciljs.com/docs/distribution
[issues]: https://github.com/alexlafroscia/ember-cli-stencil/issues
[on-modifier]: https://github.com/buschtoens/ember-on-modifier#readme