Automatic discovery of Stencil.js components for your Ember application
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.vscode
packages
.gitignore
.travis.yml
README.md
commitlint.config.js
lerna.json
package.json
yarn.lock

README.md

ember-cli-stencil

Build Status NPM Version Stencil Compatibility

Automatic discovery of Stencil.js components for your Ember application

Stencil provides a great, opinionated process for defining Web Components (custom elements) using TypeScript and JSX. The problem is that Ember has to be told about what these custom elements are and what events they can emit for you to integrate the two libraries together.

Because of the conventions of Stencil and the Ember CLI respectively, we can wrap up all of that boilerplate so that your custom elements "just work".

Installation

Start by installing your Stencil components as npm modules, as described in the distribution instructions instructions in the guide. Then, install this addon:

ember install ember-cli-stencil

That's it! Your Stencil components will automatically be detected by the addon and pulled into your application.

Features

Debugging

If the build seems slow, or you think there are packages missing, you can log some debugging information like so:

DEBUG=ember-cli-stencil:* ember serve

This will report:

  • Which packages were discovered to be Stencil collections
  • Which files were imported into your vendor.js file
  • Which files were added to the public folder of the build

If there are any issues around judging a file to be a Stencil collection incorrectly or importing the wrong files, please file an issue.