Closed trobrock closed 9 years ago
What I do for this is set a variable on each of the pages.dev.context and pages.dist.context to indicate what my LINEMAN_ENV is. Then I drop that in as a global in my pages/index.us
So many projects need this that we should just make it built in.
As an example see the pages config here so I can set a CDN in prod but not Dev: https://github.com/linemanjs/lineman-docs/blob/master/config/application.coffee
@searls Thanks, this simplified the solution we came up with a lot
I am trying to figure out the best way to get a small set of JS accessible config variables to be set based on lineman being in dev or dist mode. Is there a decent way of doing this? Even if I could have two copies of the file and one gets used in dev and the other in dist would work for us.