Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Including multiple coffeescript files from theme/assets/javascripts links incorrect code #107

STRML opened this Issue Sep 11, 2012 · 1 comment


None yet
3 participants

STRML commented Sep 11, 2012

I don't like to put all of my scripts inside a single application.js.coffee, so I created a submodule once I started writing a larger amount of code.

What I've done is split out some "mailchimp" code into "mailchimp.js.coffee" and included it like so:

      = javascript_include_tag("http://ajax.googleapis.com/ajax/libs/jquery/1.7.0/jquery.min.js")
      = javascript_include_tag("application")
      = javascript_include_tag("mailchimp") 

Wordless seems to be screwing up the compilation - inside Chrome's Web Inspector, the contents of application.js and mailchimp.js are exactly the same! Getting my application.js code back requires clearing the /tmp folder out and deleting mailchimp.js.coffee.

Any ideas?


endorama commented Sep 17, 2012

This problem is related to the caching system implemented in Wordless. Is the same problem referenced in issue 98 regarding sass compilation.

To skip the problem you have to disable file caching ( look at issue 98 to se how ).

For clarity: wordless has a caching system to speed up development: sass files and coffescripts are not compiled at each page load but only if changed. However the system is still not perfect, and leads to problem if multiple files are imported. Disabling cache system solve the problem ( but each file is compiled at each request, so development will be a little slower ).

STRML added a commit to STRML/wordless that referenced this issue Sep 19, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment