Skip to content

Conversation

@samselikoff
Copy link
Contributor

No description provided.

@samselikoff
Copy link
Contributor Author

I could use some eyes here, I tried to use findImporter and grab the config from there, but it wasn't working. When I added a console.log(this.app) to that line, it was hit 6 times. The first 5 times it was defined and the 6th it was undefined. So I wrapped this all in a conditional 🤷‍♂

I'm sure there's a better way to do this! The config I tested against is ember-cli-mirage, I added the option to its ember-cli-build.js file like this:

'use strict';

const EmberAddon = require('ember-cli/lib/broccoli/ember-addon');

module.exports = function(defaults) {
  let app = new EmberAddon(defaults, {
    'ember-cli-babel': {
      includePolyfill: true
    },
    'ember-cli-addon-docs': {
      showImportPaths: false
    },
    'ember-cli-addon-docs-esdoc': {
      packages: [ 'ember-cli-mirage', '@miragejs/server' ]
    }
  });

  /*
    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.
  */

  return app.toTree();
};

@samselikoff samselikoff force-pushed the add-show-import-paths-option branch from f1aec9e to e5c3544 Compare June 12, 2019 18:42
@samselikoff samselikoff force-pushed the add-show-import-paths-option branch from e5c3544 to 896263e Compare June 12, 2019 18:45
@samselikoff
Copy link
Contributor Author

Nvm – switched from using ember-cli-build.js in the host app to tests/dummy/config/environment.js and the existing config stuff worked!

@samselikoff samselikoff merged commit 9bf6a54 into master Jun 12, 2019
@samselikoff samselikoff deleted the add-show-import-paths-option branch June 12, 2019 20:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants