Skip to content

Automatic discovery of Stencil.js components for your Ember application

Notifications You must be signed in to change notification settings

xcambar/ember-cli-stencil

 
 

Repository files navigation

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.

About

Automatic discovery of Stencil.js components for your Ember application

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 88.0%
  • HTML 8.9%
  • TypeScript 3.1%