Skip to content
This repository has been archived by the owner on Feb 6, 2021. It is now read-only.

2.13 Addon Dependency Usage #79

Closed
DHedgecock opened this issue May 8, 2017 · 7 comments
Closed

2.13 Addon Dependency Usage #79

DHedgecock opened this issue May 8, 2017 · 7 comments

Comments

@DHedgecock
Copy link

Hello, I know that this isn't a currently 'supported' use case, but our team has a few addons that use this package to declare the template files for components inside the component file instead of the template file. It's really, really nice for making small components easy to work with when all of the assets are in one file instead of two.

After updating the addons to CLI 2.13, we can no longer use the addons in consuming Apps that are version less than 2.13. This package expects Babel6 to be in use, and the application build errors when trying to consume the 2.13+ addon that has this package as a dependency (rather than dev-depdency).

Is there a way that we can resolve this (other than moving all the templates into .hbs files)? Would be happy to help if hands are needed!

Here is an example of the type of component files we have in the addons:

import Component from 'ember-component';
import hbs from 'htmlbars-inline-precompile';

export default Component.extend({
  state: false,
  tagName: '',

  actions: {
    close() {
      this.send('setFalse');
    },
    open() {
      this.send('setTrue');
    },
    setFalse() {
      this.set('state', false);
    },
    setTrue() {
      this.set('state', true);
    },
    toggleState() {
      this.toggleProperty('state');
    }
  },

  // Layout
  // ---------------------------------------------------------------------------
  layout: hbs`
    {{yield
      state
      (hash
        setTrue=(action 'setTrue')
        setFalse=(action 'setFalse')
        open=(action 'open')
        close=(action 'close')
        toggleState=(action 'toggleState')
      )
    }}
  `

Thanks!

@rwjblue
Copy link
Member

rwjblue commented May 8, 2017

FWIW, I am working on this now. The basic issue comes down to ember-cli/ember-cli-version-checker#27.

@DHedgecock
Copy link
Author

Yasss

That's awesome 👍

@rwjblue
Copy link
Member

rwjblue commented May 8, 2017

ember-cli/ember-cli-version-checker#41 should unblock the main issue, needs review before landing and releasing as v2.0.0.

@rwjblue
Copy link
Member

rwjblue commented May 8, 2017

#80 should fix things for ember-cli-htmlbars-inline-precompile@0.3, but would love some testers...

@DHedgecock
Copy link
Author

I'm in, what should I update to test?

@rwjblue
Copy link
Member

rwjblue commented May 8, 2017

I think you should basically just need to update your nested deps that needed 0.3.x to use v0.3.10 (which I just published).

@DHedgecock
Copy link
Author

Works with 0.3.11 👍

Thanks for the uber-fast turnaround.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants