Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
let app = new EmberAddon(defaults, {
// Add options here
});
/*
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
*/
if (process.env.CLASSIC) {
return app.toTree();
}
const Webpack = require('@embroider/webpack').Webpack;
return require('@embroider/compat').compatBuild(app, Webpack);
};
// If you need to use different assets in different
// environments, specify an object as the first parameter. That
// object's keys should be the environment name and the values
// should be the asset to use in that environment.
//
// If the library that you are including contains AMD or ES6
// modules that you would like to import into your application
// please specify an object with the list of modules as keys
// along with the exports of each module as its value.
if (process.env.CLASSIC) {
return app.toTree();
}
const Webpack = require('@embroider/webpack').Webpack;
return require('@embroider/compat').compatBuild(app, Webpack);
};
module.exports = function(defaults) {
let app = new EmberAddon(defaults, {
// Add options here
});
if (process.env.CLASSIC) {
return app.toTree();
}
const Webpack = require('@embroider/webpack').Webpack;
return require('@embroider/compat').compatBuild(app, Webpack, {
staticAddonTestSupportTrees: true,
staticAddonTrees: true,
staticComponents: true,
staticHelpers: true,
splitRouteClasses: true,
splitAtRoutes: ['split-me'],
});
};
app.import('vendor/three.js', { outputFile: 'ordered.js' });
app.import('vendor/one.js', { outputFile: 'ordered.js' });
app.import('vendor/prepend/one.js', { prepend: true });
app.import('vendor/prepend/two.js', { prepend: true });
app.import('vendor/prepend/three.js', { prepend: true });
app.import('vendor/prepend/four.js', { prepend: true });
app.import('vendor/prepend/order.js', { prepend: true });
if (process.env.CLASSIC) {
return app.toTree();
}
const Webpack = require('@embroider/webpack').Webpack;
return require('@embroider/compat').compatBuild(app, Webpack);
};
module.exports = function(defaults) {
let app = new EmberApp(defaults, {});
MacrosConfig.shared().setOwnConfig(__filename, {
isClassic: Boolean(process.env.CLASSIC),
});
if (process.env.CLASSIC) {
return app.toTree();
}
const Webpack = require('@embroider/webpack').Webpack;
return require('@embroider/compat').compatBuild(app, Webpack, {
workspaceDir: process.env.WORKSPACE_DIR,
staticAddonTestSupportTrees: true,
staticAddonTrees: true,
staticComponents: true,
staticHelpers: true,
packageRules: [
{
package: 'static-app',
appModules: {
'components/fancy-box.js': {
dependsOnComponents: ['{{default-title}}'],
},
},
components: {
'{{fancy-box}}': {
acceptsComponentArguments: [{ name: 'titleComponent', becomes: 'this.titleComponentWithDefault' }],
return (function() {
const Webpack = require('@embroider/webpack').Webpack;
const { join } = require('path');
const { writeFileSync } = require('fs');
return require('@embroider/compat').compatBuild(app, Webpack, {
staticAddonTestSupportTrees: true,
staticAddonTrees: true,
staticHelpers: true,
staticComponents: true,
onOutputPath(outputPath) {
writeFileSync(join(__dirname, '.embroider-app-path'), outputPath, 'utf8');
},
packagerOptions: {
webpackConfig: {
plugins: [new MonacoWebpackPlugin(/*{languages: ['javascript', 'typescript']}*/)],
},
},
packageRules: [
{
package: '@cardstack/core',
appModules: {