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

[Feature Request] Conditional Compile #28

Open
elwayman02 opened this issue Sep 8, 2015 · 4 comments
Open

[Feature Request] Conditional Compile #28

elwayman02 opened this issue Sep 8, 2015 · 4 comments

Comments

@elwayman02
Copy link

ember-cli-conditional-compile is a similar addon that (imo) lacks the elegance of the ember-feature-flags implementation. However, one concept it has that I find really compelling is the ability to conditionally exclude certain files from being compiled altogether if a feature flag is false, by way of regex in config/environment. That addon is also outdated and apparently doesn't work in Ember 1.13.8. Instead of focusing on trying to fix up that addon, my thought was that it would be great to take the best features implementation (which is this addon) and add the conditional compile concept here, so that the community has a single addon providing the best of both features.

@kategengler
Copy link
Owner

Would it make sense to build it as an addon to this addon? It would have to be an option in any case, because I wouldn't want conditional compile for most of my uses of feature flags. Also, I can see wanting both: some flags that are conditionally compiled and some that are live flagged.

@elwayman02
Copy link
Author

I think it should be an option included as part of this addon, the same way it is with ember-cli-conditional-compile. Even in that addon it's not the default, they have config flags like this:

includeDirByFlag: {
        ENABLE_FOO: [/pods\/foos/, /pods\/foo/],
        ENABLE_BAR: [],
    }

So if you don't pass anything to includeDirByFlag that matches a particular feature flag, it doesn't exclude anything from being compiled. Only in the case of ENABLE_FOO being false would it search pods/foos and pods/foo to exclude those directories from compilation. If the configuration takes a regex, it should support both pods and Ember-CLI 1.x-style directory organization.

@kategengler
Copy link
Owner

I meant, should the entire functionality be an addon to this addon? That would allow it to use the same config/semantics but keep the functionality and development separate, especially since this addon only extends ember, but the proposed functionality is a build tool (an extension of ember-cli).

@elwayman02
Copy link
Author

Perhaps. I'm open to it either way.

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