Package detail

@ember/edition-utils

emberjs694.5kMIT1.2.0

Utilities to detect if a given edition is in use in an ember-cli application.

readme

@ember/edition-utils

This package is the officially supported mechanism for declaring and detecting the specific edition that a given application is using.

Usage

Declaring Edition

In order to declare which edition of Ember your application (or addon) is compatible with you would call setEdition from within your .ember-cli.js file. This might look something like:

const { setEdition } = require('@ember/edition-utils');

setEdition('octane');

module.exports = {
  // other configuration here
}

Detecting Edition

In order to detect if the currently running application is using at least a specific edition, you would call has. This will most commonly be used from within various addon's to determine which blueprint code to run. For example:

const { has } = require('@ember/edition-utils');

if (has('octane')) {
  // do octane stuff
} else {
  // do classic mode stuff
}

License

This project is licensed under the MIT License.

changelog

v1.2.0 (2019-12-11)

:rocket: Enhancement

Committers: 1

v1.1.1 (2019-09-15)

:bug: Bug Fix

  • #3 Force setEdition / has to normalize (by lowercasing) (@rwjblue)

Committers: 1

v1.1.0 (2019-09-15)

:rocket: Enhancement

  • #1 Allow falling back to process.env.EMBER_VERSION. (@rwjblue)

:memo: Documentation

Committers: 1

Could not infer "repo" from the "package.json" file.