@ember/edition-utils

1.2.0 • Public • Published

@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.

Dependencies (0)

    Dev Dependencies (4)

    Package Sidebar

    Install

    npm i @ember/edition-utils

    Weekly Downloads

    142,042

    Version

    1.2.0

    License

    MIT

    Unpacked Size

    12.6 kB

    Total Files

    8

    Last publish

    Collaborators

    • melsumner
    • chriskrycho
    • ef4
    • rwjblue
    • stefanpenner
    • chadhietala
    • chancancode
    • dgeb
    • krisselden
    • locks
    • mmun
    • tomdale
    • wycats
    • katiegengler
    • nullvoxpopuli
    • scalvert
    • mixonic