Security News
The Unpaid Backbone of Open Source: Solo Maintainers Face Increasing Security Demands
Solo open source maintainers face burnout and security challenges, with 60% unpaid and 60% considering quitting.
@ember/optional-features
Advanced tools
@ember/optional-features is an npm package that allows Ember.js developers to enable or disable optional features in their Ember applications. This package provides a way to manage feature flags for various experimental or legacy features, making it easier to adopt new features or phase out old ones.
Enable/Disable Optional Features
This feature allows you to enable specific optional features in your Ember application. For example, you can enable the 'application-template-wrapper' feature using the command provided.
{"command":"ember feature:enable <feature-name>","example":"ember feature:enable application-template-wrapper"}
List Available Features
This feature lists all the optional features available for your Ember application. It helps you see which features are enabled or disabled.
{"command":"ember feature:list"}
Disable Optional Features
This feature allows you to disable specific optional features in your Ember application. For example, you can disable the 'application-template-wrapper' feature using the command provided.
{"command":"ember feature:disable <feature-name>","example":"ember feature:disable application-template-wrapper"}
ember-feature-controls is another package for managing feature flags in Ember applications. It provides a simple API for defining and checking feature flags. Similar to ember-cli-feature-flags, it offers more flexibility for custom feature management compared to @ember/optional-features, which is specifically designed for managing Ember's built-in optional features.
This addon allows you to easily enable/disable optional features in ember-source. To clarify what we mean by optional, these are features that will be opt-in/opt-out and optional for the foreseeable future, not features that will be enabled by default. It is intended for use with apps only not addons.
ember install @ember/optional-features
Features will only be available in versions of ember-source that included them. To list all available features run:
ember feature:list
To enable a feature, run:
ember feature:enable some-feature
Similarly, if you want to disable a feature, you can run:
ember feature:disable some-feature
This addon exposes a build-time method called isFeatureEnabled
, which can be called from an addon's index.js
, e.g.:
included() {
let optionalFeatues = this.addons.find(a => a.name === '@ember/optional-features');
if (optionalFeatures.isFeatureEnabled('jquery-integration') {
// ...
}
}
WIP -- there does not yet exist a public API for accessing the state of optional features at runtime. This issue is tracking it.
v1.0.0 (2019-09-21)
FAQs
The default blueprint for ember-cli addons.
The npm package @ember/optional-features receives a total of 102,633 weekly downloads. As such, @ember/optional-features popularity was classified as popular.
We found that @ember/optional-features demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 17 open source maintainers 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
Solo open source maintainers face burnout and security challenges, with 60% unpaid and 60% considering quitting.
Security News
License exceptions modify the terms of open source licenses, impacting how software can be used, modified, and distributed. Developers should be aware of the legal implications of these exceptions.
Security News
A developer is accusing Tencent of violating the GPL by modifying a Python utility and changing its license to BSD, highlighting the importance of copyleft compliance.