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

Usage in Addon #40

Closed
svkangal opened this issue Nov 5, 2015 · 7 comments
Closed

Usage in Addon #40

svkangal opened this issue Nov 5, 2015 · 7 comments
Labels

Comments

@svkangal
Copy link

svkangal commented Nov 5, 2015

I am new to this whole Ember Addon stuff, would it work with addon if we add list it as a devdependancy instead? Problem of it being a dependancy is that it will get linked in to the consuming app as a dependancy.

@knownasilya
Copy link
Collaborator

What are you trying to do with less in your addon?

@svkangal
Copy link
Author

svkangal commented Nov 5, 2015

https://github.com/gdub22/ember-cli-less#usage-in-addons, My addon styles are in less, want to convert them to css when anyone uses the addon.

@knownasilya
Copy link
Collaborator

As far as I'm aware, you must put it in the dependencies otherwise it won't be installed when a user installs your addon, since devDependencies are only installed when you do npm install from within the project folder. Also, I don't think that the addon will be a direct dependency of the users project, since it's not defined in their package.json so ember-cli doesn't pick it up.

@svkangal
Copy link
Author

svkangal commented Nov 5, 2015

Thanks for replying. Right now its confusing on what is the right way to include styles and the discussion over here also got me confused.
ember-cli/ember-cli#1853

@knownasilya
Copy link
Collaborator

For addons I usually import inside the index.js in the included hook. I think that works with the preprocessor if it's in the deps.

https://github.com/knownasilya/ember-cli-toggle/blob/master/index.js#L10

@knownasilya
Copy link
Collaborator

I'm going to close this, feel free to continue asking questions here (related to this topic).

@svkangal
Copy link
Author

svkangal commented Nov 6, 2015

Thanks for the help

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

No branches or pull requests

2 participants