ember-learn / ember-learn/ember-cli-addon-docs

Doesn't work with disabled addons

Open
#362 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
172
Forks
142
PR merge metrics
No merged PRs in 30d

Description

I've got an addon that's made for testing & development, so I'm using ember-cli's `isEnabled` hook to [disable the addon](https://ember-cli.com/api/classes/Addon.html#method_isEnabled) in production environments.

```js
isEnabled() {
return this.app.env !== "production";
}
```

I just noticed that this returns `false` when `ember deploy production` is run. The deploy completes, but what is shipped to gh-pages is not a complete addon docs app. The `docs` subfolder is missing and the app errors when it tries to request the json file with all modules.

For now I've set `isEnabled` to always return `true`, but I'm wondering if I can somehow have this hook detect if it's running as part of an addon docs deploy?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.