-
Notifications
You must be signed in to change notification settings - Fork 304
environments concept #581
Comments
I personally don't like to have 2 different behaviours between prod and dev. I also usually minify the build for production release. So having the dependency already minified doesn't provide any help. |
Other use-cases:
|
I don't really understand this statement, sorry. Can you elucidate?
I agree in principal but its not that simple. Please refer to https://github.com/reactjs/react-bower/issues/1 and facebook/react#1635. |
You'll have to setup 2 different dependencies based on your environment. |
@micky2be Yup. But until For |
FWIW, were the following true, would make me very happy to not have this:
But since:
I don't see a way forward other than some simple interface tweaks to |
@jasonkuhrt in your original post, you show reactjs/reactjs and reactjs/reactjs-min - I'm probably missing something, but are you implying that component authors should be maintaining releases for minified and non-minified versions of their components? I definitely have encountered this type of use case before. Generally I find myself using component to generate standalone components which I then manage via Grunt builds, where I can actually automate tasks based on environment. AKA I rarely ever have projects that contain a component.json themselves, unless they are small modules shared across multiple projects, which I usually just build as standalone items. I am not sure that the solution of creating builds per environment really covers the full breadth and depth of problems opened up by some of the various use cases I have encountered so far, have to put some more though in to that |
@netpoetica Hey
Ideally no, but certain circumstances point in that direction. I've given up thinking about this problem space for now, too complicated for me right now. There's a cascade-like series of problems that need addressing, starting with how difficult component plugins are to employ. I don't feeling like bitching though because I would rather just help, but that's near impossible for me until later this year. |
All too nutty, never going to happen. |
This idea comes from use-cases I've routinely encountered. The premise is that we expose environment variable
COMPONENT_ENV
via e.g.require('env').
* and also let users hook onto its value incomponent.json
so that we can have branches ofcomponent.json
that are resolved only if in the respectiveenv
, e.g.:This is rough, but I think the premise is sound, again it solves real problems I've encountered. I often have
env
-aware client projects etc. Am I an exception here or can we turn this into a positive for general use?builder.js
from scratch.The text was updated successfully, but these errors were encountered: