Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues following Readme instructions for precompiling in an addon #55

Closed
sir-dunxalot opened this issue May 25, 2015 · 5 comments
Closed

Comments

@sir-dunxalot
Copy link

I'm trying to precompile HTMLBars template strings as described in the readme. However, I've come across two problems.

  1. find is undefined - this is fairly easy to solve with native JS
  2. the htmlbarsPlugin variable is equal to { name: 'ember-cli-htmlbars', ext: 'hbs', toTree: [Function] } and does not have a precompile function.

The code I am referring to is:

module.exports = {
  name: 'my-addon-name',

  setupPreprocessorRegistry: function(type, registry) {
    // Error 1 - find is not a function
    var htmlbarsPlugin = registry.load('template').find(function(plugin) {
      return plugin.name === 'ember-cli-htmlbars';
    });

    // Error 2 - precompile is not a function
    var precompiled = htmlbarsPlugin.precompile("{{my-component}}");
  }
};

Ember CLI version is 0.2.5. Ember version is 1.12.0.

@rwjblue
Copy link
Member

rwjblue commented May 25, 2015

You need the latest version to have a precompile.

@rwjblue
Copy link
Member

rwjblue commented May 25, 2015

The README is addressing [email protected], can you please confirm you are using that version?

@sir-dunxalot
Copy link
Author

Thanks for the quick response! I'm using 0.7.6. I'll update and report back - it might be worth adding a quick note about the version to the readme because I'm using the version bundled with Ember CLI 0.2.5.

@rwjblue
Copy link
Member

rwjblue commented May 25, 2015

I'd happily merge a PR adding some verbiage to that effect, but I find in general that every projects README reflects its current version...

@sir-dunxalot
Copy link
Author

Updating fixed the issue - thanks again. And whatever you prefer regarding the Readme - maybe this issue will be enough for people to avoid getting stung.

Turbo87 pushed a commit that referenced this issue Oct 19, 2018
Bumps [ember-cli-inject-live-reload](https://github.com/rwjblue/ember-cli-inject-live-reload) from 1.8.2 to 2.0.1.
<details>
<summary>Changelog</summary>

*Sourced from [ember-cli-inject-live-reload's changelog](https://github.com/ember-cli/ember-cli-inject-live-reload/blob/master/CHANGELOG.md).*

> ## v2.0.1 (2018-10-15)
> 
> #### 🐛 Bug Fix
> * [#66](https://github-redirect.dependabot.com/ember-cli/ember-cli-inject-live-reload/pull/66) Update minimum ember-cli version for scoped path ([[**rwjblue**](https://github.com/rwjblue)](https://github.com/rwjblue))
> * [#65](https://github-redirect.dependabot.com/ember-cli/ember-cli-inject-live-reload/pull/65) fix: syntax error in `dynamicScript` ([[**buschtoens**](https://github.com/buschtoens)](https://github.com/buschtoens))
> 
> #### Committers: 2
> - Jan Buschtöns ([[**buschtoens**](https://github.com/buschtoens)](https://github.com/buschtoens))
> - Robert Jackson ([[**rwjblue**](https://github.com/rwjblue)](https://github.com/rwjblue))
> 
> ## v2.0.0 (2018-10-15)
> 
> #### 💥 Breaking Change
> * [#60](https://github-redirect.dependabot.com/ember-cli/ember-cli-inject-live-reload/pull/60) Drop support for Node 4 ([[**Turbo87**](https://github.com/Turbo87)](https://github.com/Turbo87))
> 
> #### Committers: 1
> - Tobias Bieniek ([[**Turbo87**](https://github.com/Turbo87)](https://github.com/Turbo87))
> 
> ## v1.10.1 (2018-10-13)
> 
> #### 🚀 Enhancement
> * [#59](https://github-redirect.dependabot.com/ember-cli/ember-cli-inject-live-reload/pull/59) package.json: Declare Node.js version requirements. ([[**Turbo87**](https://github.com/Turbo87)](https://github.com/Turbo87))
> 
> #### 🐛 Bug Fix
> * [#58](https://github-redirect.dependabot.com/ember-cli/ember-cli-inject-live-reload/pull/58) Run test suite on TravisCI and fix Node 4 compatibility. ([[**Turbo87**](https://github.com/Turbo87)](https://github.com/Turbo87))
> 
> #### 🏠 Internal
> * [#57](https://github-redirect.dependabot.com/ember-cli/ember-cli-inject-live-reload/pull/57) Add linting via ESLint. ([[**rwjblue**](https://github.com/rwjblue)](https://github.com/rwjblue))
> 
> #### Committers: 2
> - Robert Jackson ([rwjblue](https://github.com/rwjblue))
> - Tobias Bieniek ([Turbo87](https://github.com/Turbo87))
> 
> 
> ## v1.10.0 (2018-10-13)
> 
> #### 🐛 Bug Fix
> * [#55](https://github-redirect.dependabot.com/ember-cli/ember-cli-inject-live-reload/pull/55) Pass path as argument to livereload.js ([[**SparshithNR**](https://github.com/SparshithNR)](https://github.com/SparshithNR))
> 
> #### 🏠 Internal
> * [#54](https://github-redirect.dependabot.com/ember-cli/ember-cli-inject-live-reload/pull/54) Refactoring and Tests ([[**SparshithNR**](https://github.com/SparshithNR)](https://github.com/SparshithNR))
> 
> #### Committers: 1
> - SparshithNRai ([[**SparshithNR**](https://github.com/SparshithNR)](https://github.com/SparshithNR))
</details>
<details>
<summary>Commits</summary>

- [`6177d46`](ember-cli/ember-cli-inject-live-reload@6177d46) 2.0.1
- [`f921618`](ember-cli/ember-cli-inject-live-reload@f921618) Add v2.0.1 to CHANGELOG.
- [`09f1525`](ember-cli/ember-cli-inject-live-reload@09f1525) Merge pull request [#66](https://github-redirect.dependabot.com/rwjblue/ember-cli-inject-live-reload/issues/66) from ember-cli/require-ember-cli-3-5-1
- [`ace5a8d`](ember-cli/ember-cli-inject-live-reload@ace5a8d) Update minimum ember-cli version for scoped path
- [`2e279ff`](ember-cli/ember-cli-inject-live-reload@2e279ff) Merge pull request [#65](https://github-redirect.dependabot.com/rwjblue/ember-cli-inject-live-reload/issues/65) from buschtoens/patch-1
- [`a5f3062`](ember-cli/ember-cli-inject-live-reload@a5f3062) Restructure test harness to actually evaluate script.
- [`5bab3c2`](ember-cli/ember-cli-inject-live-reload@5bab3c2) fix: add empty string in `dynamicScript`
- [`7f5ffad`](ember-cli/ember-cli-inject-live-reload@7f5ffad) fix: syntax error in `dynamicScript`
- [`21a7005`](ember-cli/ember-cli-inject-live-reload@21a7005) 2.0.0
- [`e754721`](ember-cli/ember-cli-inject-live-reload@e754721) Add v2.0.0 to CHANGELOG.md.
- Additional commits viewable in [compare view](rwjblue/ember-cli-inject-live-reload@v1.8.2...v2.0.1)
</details>
<br />

[![Dependabot compatibility score](https://api.dependabot.com/badges/compatibility_score?dependency-name=ember-cli-inject-live-reload&package-manager=npm_and_yarn&previous-version=1.8.2&new-version=2.0.1)](https://dependabot.com/compatibility-score.html?dependency-name=ember-cli-inject-live-reload&package-manager=npm_and_yarn&previous-version=1.8.2&new-version=2.0.1)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

Dependabot will **not** automatically merge this PR because it includes a major update to a development dependency.

---

**Note:** This repo was added to Dependabot recently, so you'll receive a maximum of 5 PRs for your first few update runs. Once an update run creates fewer than 5 PRs we'll remove that limit.

You can always request more updates by clicking `Bump now` in your [Dependabot dashboard](https://app.dependabot.com).

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot ignore this [patch|minor|major] version` will close this PR and stop Dependabot creating any more for this minor/major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
- `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language
- `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language
- `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language
- `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language
- `@dependabot badge me` will comment on this PR with code to add a "Dependabot enabled" badge to your readme

Additionally, you can set the following in your Dependabot [dashboard](https://app.dependabot.com):
- Update frequency (including time of day and day of week)
- Automerge options (never/patch/minor, and dev/runtime dependencies)
- Pull request limits (per update run and/or open at any time)
- Out-of-range updates (receive only lockfile updates, if desired)
- Security updates (receive only security updates, if desired)

Finally, you can contact us by mentioning @dependabot.

</details>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants