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

NPM Scope Support #343

Open
thousand opened this issue Apr 15, 2020 · 4 comments
Open

NPM Scope Support #343

thousand opened this issue Apr 15, 2020 · 4 comments

Comments

@thousand
Copy link

Right now I don't see anything in the readme about addons that include the NPM scope in the name. ember-cli has enforced that the package and addon name match for a while, and we've been using the moduleName hook in the addon's index.js to override that, mostly for backward compatibility for our consumers. It'd be nice to have the addon namespace match since we use the full package name in other non-addon places. Is there a way to do this currently, or something on the roadmap?

Copy link
Owner

rwjblue commented May 7, 2020

Sorry, I don't fully understand the question. Are you saying you'd like to use something like <@org-name/foo$whatever />?

@thousand
Copy link
Author

Yup!

@rwjblue
Copy link
Owner

rwjblue commented May 12, 2020

The issue is mostly with things that are valid to parse in Handlebars, and I believe you cannot use an @ sign in the first position within mustaches and also have arguments.

Specifically, I think this throws a parse error:

{{@something/stuff someArg=lol}}

This addon is not currently setup to try to replace handlebars’s internal parser, as it’s chosen syntax that does work in all positions (initially :: and now $).

@thousand
Copy link
Author

thousand commented May 13, 2020

I'm not necessarily looking specifically for that syntax, just some way to have the organization or scope in the addon namespace. For stuff created internally at linkedin, packages use the @linkedin org/scope, and since ember-cli enforces that addon and package names match, we must include moduleName: () => 'some-addon', in order for it to be findable through the namespaced component syntax. This seems like a missing feature, since orgs/scopes are becoming increasingly common, and an org could be used to logically group parts of a design system.

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