Search code examples
javascriptember.jsbowerember-clibroccolijs

Importing jQuery-mockjax with Ember-CLI - Brocfile not read


I'm trying to load jquery-mockjax into my test suite and followed the instructions on http://www.ember-cli.com/user-guide/#managing-dependencies.

I have placed a Brockfile.js in the root of my ember app:

var EmberApp = require('ember-cli/lib/broccoli/ember-app');

if (EmberApp.env() !== 'production') {
  app.import( app.bowerDirectory + '/jquery-mockjax/dist/jquery.mockjax.js', { type: 'test' } );
}

module.exports = app.toTree();

But it seems like the ember CLI is totally ignoring the file - I even tried adding a syntax error to trigger a build error. What could be going wrong?


Solution

  • The Ember CLI as of (1.13) does not actually read the Brocfile.js. But rather ember-cli-build.js.