npx ember-cli-code-coverage-setup-codemod setup-cli-build path/of/files/ or/some**/*glob.js
# or
yarn global add ember-cli-code-coverage-setup-codemod
ember-cli-code-coverage-setup-codemod setup-cli-build path/of/files/ or/some**/*glob.js
node ./bin/cli.js setup-cli-build path/of/files/ or/some**/*glob.js
- test-already-setup
- test-with-babel-property
- test-with-individual-options
- test-with-plugin-property
- test-without-babel-property
Input (test-already-setup.input.js):
'use strict';
const EmberApp = require('ember-cli/lib/broccoli/ember-app');
const codeCoverage = require('ember-cli-code-coverage');
module.exports = function (defaults) {
let app = new EmberApp(defaults, {
babel: {
plugins: [
...codeCoverage.buildBabelPlugin({ embroider: !!process.env.EMBROIDER })
],
},
});
// additional configuration
return app.toTree();
};
Output (test-already-setup.output.js):
'use strict';
const EmberApp = require('ember-cli/lib/broccoli/ember-app');
const codeCoverage = require('ember-cli-code-coverage');
module.exports = function (defaults) {
let app = new EmberApp(defaults, {
babel: {
plugins: [
...codeCoverage.buildBabelPlugin({ embroider: !!process.env.EMBROIDER })
],
},
});
// additional configuration
return app.toTree();
};
Input (test-with-babel-property.input.js):
'use strict';
const EmberApp = require('ember-cli/lib/broccoli/ember-app');
module.exports = function (defaults) {
let app = new EmberApp(defaults, {
babel: {},
});
// additional configuration
return app.toTree();
};
Output (test-with-babel-property.output.js):
'use strict';
const EmberApp = require('ember-cli/lib/broccoli/ember-app');
module.exports = function (defaults) {
let app = new EmberApp(defaults, {
babel: {
plugins: [...require('ember-cli-code-coverage').buildBabelPlugin({
embroider: !!process.env.EMBROIDER,
})],
},
});
// additional configuration
return app.toTree();
};
Input (test-with-individual-options.input.js):
'use strict';
const EmberApp = require('ember-cli/lib/broccoli/ember-app');
module.exports = function (defaults) {
const options = {
emberHighCharts: {
includeHighCharts: true,
includeHighStock: false,
includeHighChartsMore: true,
includeHighCharts3D: true,
includeModules: ['solid-gauge'],
},
}
let app = new EmberApp(defaults, options);
// additional configuration
return app.toTree();
};
Output (test-with-individual-options.output.js):
'use strict';
const EmberApp = require('ember-cli/lib/broccoli/ember-app');
module.exports = function (defaults) {
const options = {
emberHighCharts: {
includeHighCharts: true,
includeHighStock: false,
includeHighChartsMore: true,
includeHighCharts3D: true,
includeModules: ['solid-gauge'],
},
babel: {
plugins: [...require('ember-cli-code-coverage').buildBabelPlugin({
embroider: !!process.env.EMBROIDER,
})],
},
}
let app = new EmberApp(defaults, options);
// additional configuration
return app.toTree();
};
Input (test-with-plugin-property.input.js):
'use strict';
const EmberApp = require('ember-cli/lib/broccoli/ember-app');
module.exports = function (defaults) {
let app = new EmberApp(defaults, {
babel: {
plugins: [],
},
});
// additional configuration
return app.toTree();
};
Output (test-with-plugin-property.output.js):
'use strict';
const EmberApp = require('ember-cli/lib/broccoli/ember-app');
module.exports = function (defaults) {
let app = new EmberApp(defaults, {
babel: {
plugins: [...require('ember-cli-code-coverage').buildBabelPlugin({
embroider: !!process.env.EMBROIDER,
})],
},
});
// additional configuration
return app.toTree();
};
Input (test-without-babel-property.input.js):
'use strict';
const EmberApp = require('ember-cli/lib/broccoli/ember-app');
module.exports = function (defaults) {
let app = new EmberApp(defaults, {
emberHighCharts: {
includeHighCharts: true,
includeHighStock: false,
includeHighChartsMore: true,
includeHighCharts3D: true,
includeModules: ['solid-gauge'],
},
});
// additional configuration
return app.toTree();
};
Output (test-without-babel-property.output.js):
'use strict';
const EmberApp = require('ember-cli/lib/broccoli/ember-app');
module.exports = function (defaults) {
let app = new EmberApp(defaults, {
emberHighCharts: {
includeHighCharts: true,
includeHighStock: false,
includeHighChartsMore: true,
includeHighCharts3D: true,
includeModules: ['solid-gauge'],
},
babel: {
plugins: [...require('ember-cli-code-coverage').buildBabelPlugin({
embroider: !!process.env.EMBROIDER,
})],
},
});
// additional configuration
return app.toTree();
};