mercredi 20 mai 2015

Ember CLI: Build for staging

I'd like to create a build of an Ember CLI app for a staging environment. For staging, I'd like to essentially do exactly the same thing as production (minification, fingerprinting, exclude tests, etc), but want to pick up the environment variables for development. To attempt this, I changed my environment.js file to account for staging:

if (environment === 'development' || environment === 'staging') {
  ENV.someApiKey = 'test-api-key';
}

if (environment === 'production') {
  ENV.someApiKey = 'production-api-key';
}

When I run ember build --environment=staging, the proper staging environment variables are set, but all of the other build processes that would run for production doesn't. Is there a way to tell Ember CLI to build for production but pick up environment variables for development?




Aucun commentaire:

Enregistrer un commentaire