Skip to content

Commit 107e02f

Browse files
committed
Documentation
1 parent 4774912 commit 107e02f

File tree

2 files changed

+19
-11
lines changed

2 files changed

+19
-11
lines changed

README.md

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
ember-web-component-container
22
==============================================================================
33

4-
[Short description of the addon.]
5-
4+
This addon exposes your Ember app as a standard WebComponent,
5+
which makes it much easier to integrate in existing applications.
66

77
Compatibility
88
------------------------------------------------------------------------------
@@ -23,14 +23,30 @@ ember install ember-web-component-container
2323
Usage
2424
------------------------------------------------------------------------------
2525

26-
[Longer description of how to use the addon in apps.]
26+
Once the addon is installed, you can remove the `<link>` tags fron your `index.html`.
27+
28+
The CustomElement that is created is the dasherised version of the application name:
29+
If your app is `my-devilish-venture`, add `<my-devilish-venture></my-devilish-venture>`
30+
to your `index.html` to start the app.
31+
32+
**note**: CustomElement MUST be dasherized names. In case your application
33+
is single-worded (as in "mononoke"), the addon will expose
34+
`mononoke-app` (Note the `-app` prefix) for compliance.
2735

36+
**note**: We aso recommend that you remove the addon `export-application-global`.
37+
The application itself is accessible from the Custom Element itself as follows:
38+
`document.querySelector("my-devilish-venture").__EMBER_APPLICATION`
2839

2940
Contributing
3041
------------------------------------------------------------------------------
3142

3243
See the [Contributing](CONTRIBUTING.md) guide for details.
3344

45+
### TODO
46+
47+
* Deal with attributes and slots
48+
* JS isolation
49+
3450

3551
License
3652
------------------------------------------------------------------------------

addon/create-web-components.js

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,3 @@ if (-1 === config.modulePrefix.indexOf('-')) {
6262
}
6363

6464
customElements.define(componentName, ApplicationContainer)
65-
66-
67-
/**
68-
* TODO
69-
* RECOMMEND to remove export-application-global
70-
* Attributes and slots
71-
* More isolation
72-
*/

0 commit comments

Comments
 (0)