Skip to content

Commit

Permalink
docs: add a warning about ember-export-application-global in the read…
Browse files Browse the repository at this point in the history
…me and move it to dependencies
  • Loading branch information
BlueCutOfficial committed Apr 28, 2023
1 parent 2f5fda9 commit cdbe9ef
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 13 deletions.
18 changes: 7 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)


⚠️ This addon depends on [ember-export-application-global](https://github.com/ember-cli/ember-export-application-global)
to get your application globally exposed, but it's deprecated.

Makes it easier to embed your Ember application in another (non-Ember) app.

This addon gives you more control over how and when your Ember app will boot and also allows to
add/override some configuration so that the Ember app can boot with some context-dependent config.
This addon gives you more control over how and when your Ember app will boot and also allows how to add/override some configuration so that the Ember app can boot with some context-dependent config.

We found it especially useful, for example, when migrating an existing app to Ember part by part.

Expand Down Expand Up @@ -55,11 +57,7 @@ Doing so will make your application hold until you manually start it. (read on t

### Start your app

This addon relies on [ember-export-application-global](https://github.com/ember-cli/ember-export-application-global)
to get your application globally exposed. See its documentation for more information.

In your JS code, just execute `MyApp.start(/* optionalConfig */)` to resume the boot of your
application. As per the example, it takes an optional configuration as its first argument.
In your JS code, execute `MyApp.start(/* optionalConfig */)` to resume the boot of your application. As per the example, it takes an optional configuration as its first argument.

Remember:
Your app __will not start__ unless you call `MyApp.start(/* optionalConfig */)` method.
Expand Down Expand Up @@ -180,8 +178,7 @@ assert.deepEqual(

### About the test environment

In your test suite, you will probably want to let your application start automatically without this
addon interfering.
In your test suite, you will probably want to let your application start automatically without this addon interfering.

To do that, make sure to disable the addon for the `test` environment:

Expand All @@ -196,8 +193,7 @@ if (environment === 'test') {

### TypeScript support

If your consuming application relies on TypeScript, you can make your life a bit easier by using the
included types:
If your consuming application relies on TypeScript, you can make your life a bit easier by using the included types:

**File `/types/my-project/index.d.ts`**

Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@
"dependencies": {
"ember-cli-babel": "^7.26.11",
"ember-cli-htmlbars": "^6.1.1",
"ember-cli-typescript": "^5.2.1"
"ember-cli-typescript": "^5.2.1",
"ember-export-application-global": "^2.0.1"
},
"devDependencies": {
"@ember/optional-features": "^2.0.0",
Expand Down Expand Up @@ -86,7 +87,6 @@
"ember-cli-terser": "^4.0.2",
"ember-cli-typescript-blueprints": "^3.0.0",
"ember-disable-prototype-extensions": "^1.1.3",
"ember-export-application-global": "^2.0.1",
"ember-load-initializers": "^2.1.2",
"ember-qunit": "^6.2.0",
"ember-resolver": "^8.0.3",
Expand Down

0 comments on commit cdbe9ef

Please sign in to comment.