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

Default blueprint doesn't get executed automatically when running ember install <local file path> #8937

Open
shankarsridhar opened this issue Nov 24, 2019 · 1 comment
Labels

Comments

@shankarsridhar
Copy link

shankarsridhar commented Nov 24, 2019

Could be closely related to #6833.

I am building an ember addon that requires a default blueprint to be run (that is, as part of ember install <addon-name>).

And I noticed that the default blueprint doesn't run when I use a file path:
ember install <local path to addon folder>

After I publish the addon to the registry, the default blueprint from my addon works as expected - that is, files getting placed in the appropriate path in the consuming ember app.

ember install <addon-name(package.json#name)>

Is this expected ?

Current workaround(I guess I can call it a workaround ?) that I am doing:
Add the "defaultBlueprint: key under the ember-addon section in the package.json as follows:

"ember-addon": {
    "defaultBlueprint": "@shankarscope/ember-imaginary-addon"
}

Thanks to info from source here:
https://github.com/ember-cli/ember-cli/blob/master/lib/tasks/addon-install.js#L96

if (emberAddon && emberAddon.defaultBlueprint) {
  return emberAddon.defaultBlueprint;
}

Output from ember version --verbose && npm --version && yarn --version:

3.15.0-beta.1-master-73a2006723
ember-cli: 3.15.0-beta.1-master-73a2006723
2.8.0
http_parser: 2.8.0
10.15.0
node: 10.15.0
6.8.275.32-node.45
v8: 6.8.275.32-node.45
1.23.2
uv: 1.23.2
1.2.11
zlib: 1.2.11
1.15.0
ares: 1.15.0
64
modules: 64
1.34.0
nghttp2: 1.34.0
3
napi: 3
1.1.0j
openssl: 1.1.0j
62.1
icu: 62.1
11.0
unicode: 11.0
33.1
cldr: 33.1
2018e
tz: 2018e
darwin x64
os: darwin x64
6.4.1

@shankarsridhar shankarsridhar changed the title Default blueprints don't get executed automatically when running ember install <local file path> Default blueprint doesn't get executed automatically when running ember install <local file path> Nov 24, 2019
@rwjblue
Copy link
Member

rwjblue commented Nov 26, 2019

Ya, definitely seems to be a bug. I suspect we are not properly grabbing hte name of the addon from the target package.json (or index.js), so we look for a default blueprint named ./some/whatever/addon-name instead of addon-name.

@rwjblue rwjblue added the bug label Nov 26, 2019
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