-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Support custom ENVs #1520
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
Support custom ENVs #1520
Conversation
var jshintedApp = jshintTrees(preprocessedApp, { | ||
jshintrcPath: this.options.jshintrc.app, | ||
jshintrcPath: config.get('hinting', 'js', 'app') || this.project.root, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we support ember's path support? get('hinting.js.app')
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Had the same thought when writing that line! 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
^^ get('hinting.js.app')
would be great, but we can add it in a follow up PR
Scheint gut Bruder. |
My most important question before I proceed: |
ping @stefanpenner |
@dschmidt thanks for the reminder I have been traveling. Will review this evening. |
@dschmidt this looks fantastic, only tiny feedbacks^ I think for the first pass we can ignore the caching stuff, subsequent work and introduce this. |
Looks good. Happy to defer the caching issue for now. |
Conflicts: lib/broccoli/ember-app.js lib/models/project.js tests/helpers/mock-project.js
can I provide any help/feedback here (sorry I have been out of town with little time to provide feedback here) |
Yup, you can. I am pretty clueless about what's up with tests ... they are hanging for me and having odd issues that I really don't know how to debug. So if you could walk me through debugging it, that would be rad. Currently I am still at the ownCloud sprint, but could work on it early next week. |
I'm still aware of this PR, just been travelling a lot last month and haven't got around to it. Will get back to it soon hopefully, sorry. |
No worries im in the same boat |
cc @lukemelia |
Submitted #2164 to make adding additional environments (as either production or development styles) really simple. |
I will attempt some time this Saturday to help get this to completion. |
Thanks a lot @stefanpenner. While I know there's probably not much I can do, let me know if I can do anything to help. |
And thanks for attempt at temporary fix @rwjblue. |
@joshsmith if u can get that PR over the finish line that would be handy. |
What still needs to be done? I was able to make the tests pass with a fairly trivial change from |
I'm a bit late chiming in here but it's better late than never. First, since we're in ember-land I think we should make this very ember like and pretty much clone This also means My idea is the API look like: config.set(keyPath, value);
config.get(keyPath);
config.isEnabled(keyPath);
config.setProperties(keyPath, hash); Thoughts? |
we still intend to solve this, but master has diverged pretty far. I am going to close this, but we will sort this out. |
What's the status of this? |
Status? |
@stefanpenner is there any update on this feature? We are trying to put our app up but we need staging environment support |
Please use the existing 3 env. And configure those further with environment variables |
Ah, thats pretty obvious in retrospect. For others that come across this i found a decent SO post here to help: http://stackoverflow.com/questions/26403334/how-to-pass-api-keys-in-environment-variables-to-ember-cli-using-process-env @stefanpenner thank you! |
Two years later - is support for staging never going to be done? Documentation implies otherwise. Honestly I just encountered this issue today and can't understand why isn't it added? Am I really supposed to pass variables from bash if I need them for staging, like the @trcarden post above suggests? I'm really lost. There was an issue opened to document it (#5400) but documentation was never done. |
@zackthehuman can you paste in the snippet that you wrote? |
@nathanhammond I think this is what you're referring to. I sometimes build my addon's dummy app in order to use it like a demo/api documentation. For certain reasons I am unable to use the production build, so I want to use the development build, but I need to override some settings when I'm building the "apidoc" mode.
|
Is there a better way how to add staging environment like production and development? I need to set API_HOST for each environment in my app, but I can't wait another 2 year for support this feature. |
@meliborn See the comment above yours. That represents a semi-official recommendation for how to toggle different information on a per-build basis. You'd use that code and something like:
|
@nathanhammond wrong link? |
I use dot env - works a treat
…On Fri, 25 Nov 2016 at 18:17, Denis ***@***.***> wrote:
@nathanhammond <https://github.com/nathanhammond> wrong link?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#1520 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAK3jATa5osJkbfrdO2CxBoNkgt2YNSYks5rByY_gaJpZM4CSCyd>
.
|
@wayne-o could you throw me an example please? Can't imagine how to use it without if-env block |
@meliborn Corrected link. Literally the comment above yours provides a workaround you can use, and my comment demonstrates how you could use it. |
Also, @meliborn
This type of communication is not constructive in an open source community. This implies a demand. Our work on Ember is a labor of love. Very few of us are paid to work directly on Ember projects, and if we are those efforts are strongly directed by those who are paying. We're real human beings with hobbies and pastimes and friends and things we do other than this. We strive to be friendly and helpful in spite of this, but I wanted to provide a bit of feedback so you understand that it's frustrating and hurtful to read comments like that. We'd love infinite time to address all things. I assure you. But we must prioritize. |
Hey,
so I started trying to implement the proposal from https://gist.github.com/rwjblue/51f1df4b21a23466ae47
To make sure I understood it right and to show up my problems I'm submitting this in a really early hacky stage.
Instead of adding methods to the EmberApp object I created a config model that is passed to the respective configuration module.
See the corresponding config files here: https://github.com/dschmidt/ember-cli-sass-demo/tree/customenvs/config
Going to add my questions as comments to the code below
Best regards,
Dominik