ember-app-kit

Ember App Kit 'validate-imports' task blows up when using coffee-script


I have renamed app.js to app.coffee (as well as translated the contents), but now when I compile I get this error:

Running "validate-imports:tests" (validate-imports) task
>> client/tests/helpers/start-app: Cannot find module "client/app"

This error goes away when I translate the file back to javascript.

I have added the grunt-contrib-coffee and confirmed it works correctly, the problem I believe is that the coffee-script compilation happens after the validate-imports task which looks for .js files in the app folder. Does this need to be tweaked to look in the tmp/javascripts folder where the coffee-script gets compiled to?

Here is the task in question:

  // Scripts
  grunt.registerTask('buildScripts', filterAvailable([
                     'jshint:app',
                     'jshint:tests',
                     'validate-imports:app',
                     'validate-imports:tests',
                     'coffee',
                     'emberscript',
                     'copy:javascriptToTmp',
                     'transpile',
                     'concat_sourcemap'
                     ]));

Anyone know of this bug?


Solution

  • I found an answer here. Thus, when I tried it, I renamed start-app.js to start-app.coffee, converted the code into coffescript and now it works without that error.

    Bryan