MCPcopy
hub / github.com/ember-cli/ember-cli / addOutputFile

Function addOutputFile

lib/broccoli/ember-app.js:1326–1345  ·  view source on GitHub ↗
(strategy, container, assetPath, options)

Source from the content-addressed store, hash-verified

1324module.exports = EmberApp;
1325
1326function addOutputFile(strategy, container, assetPath, options) {
1327 let outputFile = options.outputFile;
1328
1329 if (!outputFile) {
1330 throw new Error('outputFile is not specified');
1331 }
1332
1333 if (!container[outputFile]) {
1334 container[outputFile] = [];
1335 }
1336 if (!allowImport(strategy, container[outputFile], assetPath, options)) {
1337 return;
1338 }
1339
1340 if (options.prepend) {
1341 container[outputFile].unshift(assetPath);
1342 } else {
1343 container[outputFile].push(assetPath);
1344 }
1345}
1346
1347// In this strategy the last instance of the asset in the array is the one which will be used.
1348// This applies to CSS where the last asset always "wins" no matter what.

Callers 1

_importMethod · 0.85

Calls 1

allowImportFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…