Security News
JSR Working Group Kicks Off with Ambitious Roadmap and Plans for Open Governance
At its inaugural meeting, the JSR Working Group outlined plans for an open governance model and a roadmap to enhance JavaScript package management.
ember-env-macros
Advanced tools
Get both build and runtime configurations in Ember app or addon.
yarn add ember-env-macros
If you have build env:
// ember-cli-build.js
module.exports = function(defaults) {
let app = new EmberAddon(defaults, {
'some-config': {
buildKey: true,
nestedKey: {
key: 'build',
},
},
});
return app.toTree();
};
and config env:
module.exports = function(environment) {
let ENV = {
// ...
'some-config': {
envKey: false,
nestedKey: {
key: 'config',
},
},
}
You can get access to them via:
import { configEnv, buildEnv } from 'ember-env-macros';
let model = {
config: {
envValue: configEnv('some-config.envKey'),
nestedValue: configEnv('some-config.nestedKey.key'),
defaultValue: configEnv('some-config.missingKey', 'default'),
},
build: {
buildValue: buildEnv('some-config.buildKey'),
nestedValue: buildEnv('some-config.nestedKey.key'),
defaultValue: buildEnv('some-config.missingKey', 'default'),
},
};
The build output will be:
var model = {
config: {
envValue: false,
nestedValue: 'config',
defaultValue: 'default',
},
build: {
buildValue: true,
nestedValue: 'build',
defaultValue: 'default',
},
};
See the Contributing guide for details.
This project is licensed under the MIT License.
FAQs
The default blueprint for ember-cli addons.
The npm package ember-env-macros receives a total of 47 weekly downloads. As such, ember-env-macros popularity was classified as not popular.
We found that ember-env-macros demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
At its inaugural meeting, the JSR Working Group outlined plans for an open governance model and a roadmap to enhance JavaScript package management.
Security News
Research
An advanced npm supply chain attack is leveraging Ethereum smart contracts for decentralized, persistent malware control, evading traditional defenses.
Security News
Research
Attackers are impersonating Sindre Sorhus on npm with a fake 'chalk-node' package containing a malicious backdoor to compromise developers' projects.