Deprecations Added in Ember CLI 4.x
What follows is a list of deprecations introduced to Ember CLI during the 4.x cycle.
For more information on deprecations in Ember CLI, see the main deprecations page.
Deprecations Added in 4.3.0
Blueprint::addBowerPackageToProject
addBowerPackageToProject has been deprecated. If the package is also available
on the npm registry, please use addPackageToProject instead. If not, please
suggest your users to install the Bower package manually by running:
bower install <package-name> --save
Blueprint::addBowerPackagesToProject
addBowerPackagesToProject has been deprecated. If the packages are also available
on the npm registry, please use addPackagesToProject instead. If not, please
suggest your users to install the Bower packages manually by running:
bower install <package-name> <package-name> --save
Building Bower Packages
Building Bower packages has been deprecated.
Please consider one of the following alternatives:
- Install the package via the npm registry and use
ember-auto-importto import the package into your project - If alternative 1 is not an option, you could copy the contents of the Bower
package into the
/vendorfolder and useapp.importto import the package into your project
Project::bowerDependencies
bowerDependencies has been deprecated. If you still need access to the
project's Bower dependencies, you will have to manually resolve the project's
bower.json file instead:
'use strict';
const fs = require('fs-extra');
const path = require('path');
module.exports = {
name: require('./package').name,
included() {
this._super.included.apply(this, arguments);
let bowerPath = path.join(this.project.root, 'bower.json');
let bowerJson = fs.existsSync(bowerPath) ? require(bowerPath) : {};
let bowerDependencies = {
...bowerJson.dependencies,
...bowerJson.devDependencies,
};
// Do something with `bowerDependencies`.
},
};
Project::bowerDirectory
bowerDirectory has been deprecated. If you still need access to the
project's Bower directory, you will have to manually resolve the project's
.bowerrc file and read the directory property instead:
'use strict';
const fs = require('fs-extra');
const path = require('path');
module.exports = {
name: require('./package').name,
included() {
this._super.included.apply(this, arguments);
let bowerConfigPath = path.join(this.project.root, '.bowerrc');
let bowerConfigJson = fs.existsSync(bowerConfigPath) ? fs.readJsonSync(bowerConfigPath) : {};
let bowerDirectory = bowerConfigJson.directory || 'bower_components';
// Do something with `bowerDirectory`.
},
};
Deprecations Added in 4.4.0
blacklist and whitelist build options
Using the blacklist and whitelist build options has been deprecated. Please
use exclude and include respectively instead.
module.exports = function (defaults) {
const app = new EmberApp(defaults, {
addons: {
blacklist: ['addon-name'],
exclude: ['addon-name'],
},
};
};
Deprecations Added in 4.6.0
ember-cli-jshint support
Support for ember-cli-jshint has been deprecated. Please use ESLint directly instead. Please refer to the default app blueprint on how to set up ESLint in an Ember app:
vendor-shim blueprint
The vendor-shim blueprint has been deprecated. Please use ember-auto-import
instead to import normal npm packages.