Skip to content

Commit 1f6c8c2

Browse files
committed
Update based on review
1 parent 12e121c commit 1f6c8c2

1 file changed

Lines changed: 12 additions & 3 deletions

File tree

index.js

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ module.exports = {
7979
this._appRegistry = app.registry;
8080
this._name = app.name;
8181

82-
this.options = this._optionsFor(app.env, app.project);
82+
this.fastbootOptions = this._fastbootOptionsFor(app.env, app.project);
8383

8484
migrateInitializers(this.project);
8585
},
@@ -327,7 +327,7 @@ module.exports = {
327327
const outputPath = broccoliHeader['outputPath'];
328328
const fastbootOptions = Object.assign(
329329
{},
330-
this.options,
330+
this.fastbootOptions,
331331
{ distPath: outputPath }
332332
);
333333

@@ -381,7 +381,16 @@ module.exports = {
381381
return (typeof this.project.isModuleUnification === 'function') && this.project.isModuleUnification();
382382
},
383383

384-
_optionsFor(environment, project) {
384+
/**
385+
* Reads FastBoot configuration from application's `config/fastboot.js` file if present,
386+
* otherwise returns empty object.
387+
*
388+
* The configuration file is expected to export a function with `environment` as an argument,
389+
* which is same as a how `config/environment.js` works.
390+
*
391+
* TODO Allow add-ons to provide own options and merge them with the application's options.
392+
*/
393+
_fastbootOptionsFor(environment, project) {
385394
const configPath = path.join(path.dirname(project.configPath()), 'fastboot.js');
386395

387396
if (fs.existsSync(configPath)) {

0 commit comments

Comments
 (0)