Created
July 25, 2012 20:17
-
-
Save goshacmd/3178375 to your computer and use it in GitHub Desktop.
Brunch config compiler proposal
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# When compiled with `NODE_ENV=production PUSHER_APP_KEY=123abc API_ENDPOINT_HOST=api.app.com brunch build` | |
# the following is produced and included into build. | |
config = {api: {}} | |
config.env = "production" | |
config.pusher_app_key = "123abc" | |
config.api.endpoint = "api.app.com" | |
module.exports = config |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ECO is template processed by node.js first, then is put as app/config.coffee and included into built app. | |
config = {api: {}} | |
config.env = "<%= process.env.NODE_ENV or 'development' %>" | |
config.pusher_app_key = "<%= process.env.PUSHER_APP_KEY %>" | |
config.api.endpoint = "<%= process.env.API_ENDPOINT_HOST or 'api.app.dev' %>" | |
module.exports = config |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment