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

In-repo addon dependencies #4164

Closed
gpoitch opened this issue May 26, 2015 · 2 comments
Closed

In-repo addon dependencies #4164

gpoitch opened this issue May 26, 2015 · 2 comments

Comments

@gpoitch
Copy link

gpoitch commented May 26, 2015

I've added some dependencies to an in-repo addon's package.json dependencies hash. They only work if you run npm install directly in that addon's directory. It is possible for them to install when running npm install from the project root (like standard addons)? Doing it from each directory is a slightly awkward requirement to someone cloning the project.

@rwjblue
Copy link
Member

rwjblue commented May 26, 2015

If a given dep exists in the project's package.json they are available in the in repo addon (regardless of if the in-repo-addon's package.json lists the dep). So if you don't want to run npm install in the in-repo-addons, you can add the deps to the projects package.json.

The idea behind in-repo-addons is that they are relatively lightweight and low ceremony. If you find yourself needing the addon to have nested dependencies that do not belong in the project itself you should likely consider making it a full fledged addon instead...

@gpoitch
Copy link
Author

gpoitch commented May 26, 2015

Great, thanks for the info, makes sense. The use-case was themes so I needed any preprocessing to run within the addon first, which required the dependency at the addon's level. I have some other ideas. Thanks!

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