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

Generate a module instead of using globals. #15

Open
nathanhammond opened this issue Dec 22, 2015 · 5 comments
Open

Generate a module instead of using globals. #15

nathanhammond opened this issue Dec 22, 2015 · 5 comments

Comments

@nathanhammond
Copy link
Collaborator

I'd like to move away from inserting feature state as a global inside of app-prefix to make it easier to move to a modules-only world. See: ember-cli/ember-cli#5240

As a result I would want to modify ember-cli-defeatureify to generate a module which could be included into any ember app's module that needs defeatureifying:

import myNamespace from 'ember-cli-defeatureify/config';

The change for any existing users of this addon would be the above mechanical change. Would you accept a PR for this functionality?

@stefanpenner
Copy link

import 'ember-cli-defeatureify/config' as myNamespace;

I don't believe this is valid syntax.

@stefanpenner
Copy link

As feature state is entirely static, and it is more configuration related, encoding it as a meta tag and using ember-cli/ember-cli#5233 to insert it as a module seems the best bet.

@nathanhammond
Copy link
Collaborator Author

@stefanpenner responding in order:

  1. Totally right, flipped the clauses in that import statement. Corrected inline above.
  2. +1, I agree. How should storing config in meta tags play with Enable storeConfigInMeta only for FastBoot builds ember-fastboot/ember-cli-fastboot#81? Then again, since defeatureify actually removes the code, I don't know that fastboot actually cares. Can @zeppelin chime in here?

@stefanpenner
Copy link

, I don't know that fastboot actually cares.

I suspect it does.

How should storing config in meta tags play with ember-fastboot/ember-cli-fastboot#81?

ideally by just inserting the given module into the loader an alternative way (arg to the boot process maybe?)

@zeppelin
Copy link

@nathanhammond can do, but I have very little knowledge of Ember's boot process (& FastBoot in general). That said, I have to learn more about it at some point, so I'll definitely keep myself in the loop.

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

3 participants