Skip to content

Commit ef22ee5

Browse files
authored
Merge pull request #3 from empress/ember-cli-build
add a way to override ember-cli-build config
2 parents a297da6 + e1c58c5 commit ef22ee5

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

bin/bottled-ember

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,32 @@ async function run() {
8282
}`
8383
);
8484

85+
await rmSync(join(cacheDir, 'ember-cli-build.js'));
86+
87+
await writeFileSync(
88+
join(cacheDir, 'ember-cli-build.js'),
89+
`'use strict';
90+
91+
const EmberApp = require('ember-cli/lib/broccoli/ember-app');
92+
let buildConfig = {}
93+
94+
try {
95+
const localConfig = require('${join(process.cwd(), 'config')}');
96+
97+
if (localConfig['ember-cli-build']) {
98+
buildConfig = localConfig['ember-cli-build'];
99+
}
100+
} catch {
101+
// do nothing
102+
}
103+
104+
module.exports = function (defaults) {
105+
let app = new EmberApp(defaults, buildConfig);
106+
return app.toTree();
107+
};
108+
`
109+
)
110+
85111
console.log('installing linking your local app 🤖');
86112

87113
await execa('npx', ['pnpm', 'install', process.cwd()], {

0 commit comments

Comments
 (0)