@warp-drive/build-config
Version:
Provides Build Configuration for projects using WarpDrive or EmberData
31 lines (27 loc) • 807 B
JavaScript
;
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
function addonShim(dirName, options) {
const path = require('path');
const pkg = require(path.join(dirName, './package.json'));
const isV2Addon = pkg['ember-addon']?.version === 2;
if (isV2Addon) {
const {
addonV1Shim
} = require('@embroider/addon-shim');
return addonV1Shim(dirName, options);
}
const Funnel = require('broccoli-funnel');
return {
name: pkg.name,
treeForVendor() {},
treeForPublic() {},
treeForStyles() {},
treeForAddonStyles() {},
treeForApp() {},
treeForAddon() {
return this._super.treeForAddon.call(this, new Funnel(path.join(dirName, 'dist')));
}
};
}
exports.addonShim = addonShim;
//# sourceMappingURL=addon-shim.cjs.map