I’m relatively new to Ember and was wondering if there is a way to create a blueprint/generator that would inject a new value into the environment config. Is there some Ember magic that allows an existing file to act as the blueprint template? My ideal implementation would look something like this:
ember g platform foo
// config/environment.js
module.exports = function(environment) {
var ENV = {
// Existing config values here...
APP: {
platforms: {
foo: 'abc123' // Generator injects the 'foo' platform and a GUID
}
};
// Existing environment-specific settings here...
return ENV;
};
I realize this is probably more of a Node question (using fs.readFile()
and fs.writeFile()
), but any ideas are appreciated – thanks!