How to use the ember-source/package.json.version function in ember-source

To help you get started, we’ve selected a few ember-source examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github kaliber5 / ember-sticky-element / ember-cli-build.js View on Github external
module.exports = function(defaults) {
  let emberVersion = require('ember-source/package.json').version;
  let supportsNoJQuery = emberVersion.match(/^[\^~]?3.\d+.\d+.*$/);

  let app = new EmberAddon(defaults, {
    vendorFiles: supportsNoJQuery ?  { 'jquery.js': null } : undefined
  });

  /*
    This build file specifies the options for the dummy test app of this
    addon, located in `/tests/dummy`
    This build file does *not* influence how the addon or the app using it
    behave. You most likely want to be modifying `./index.js` or app's build file
  */

  return app.toTree();
};