asciidisco / asciidisco/grunt-requirejs
Compiled build not running
- Dominant language
- JavaScript
- Stars
- 298
- Forks
- 71
- PR merge metrics
- No merged PRs in 30d
Description
I recently updated grunt-requirejs via NPM and my compiled JavaScript no longer runs. The main file loads but the callback passed to `define` is not executed. However, everything works fine when I don't compile and just load the modules dynamically. I've created a test project so you can hopefully reproduce the error.
Here's the [compiled file](https://gist.github.com/4317922) found in `build/js` after running `$ grunt`
My directory structure:
```
node_modules
test.html
grunt.js
src/
src/js
src/js/test.js
```
Contents of test.js:
```
// Generated by CoffeeScript 1.4.0
define(function() {
return console.log('loaded');
});
```
Contents of grunt.js:
```
// Generated by CoffeeScript 1.4.0
module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-requirejs');
grunt.initConfig({
requirejs: {
compile: {
options: {
almond: true,
modules: [
{
name: 'test'
}
],
dir: 'build',
appDir: 'src',
baseUrl: 'js',
optimize: 'none'
}
}
}
});
return grunt.registerTask('default', 'requirejs');
};
```
Contents of test.html:
```
Test
```
Versions:
```
$ grunt -version
grunt v0.3.17
$ npm view grunt-requirejs version
0.3.1
```
Contributor guide
Assessment
This issue has not been assessed yet.