Closed arnaud-lb closed 11 years ago
:+1:
@arnaud-lb, see my answer on the https://github.com/hearsayit/HearsayRequireJSBundle/issues/31 issue.
@IgorTimoshenko here are some reasons require-cs
cannot be used with the bundle:
require-cs
compiles the coffeescript files on the client side, which is not desirable:
coffee
assetic filter is usualy applied implicitly on every .coffee
file on projects with a few coffee scripts (with apply_to: \.coffee$
in assetic.filters.coffee
), so it breaks require-cs
(the bundle outputs compiled coffee-script, i.e. javascript code, with a .coffee extension, which require-cs
loads and tries to compile as coffee-script, which wouldn't work)require-cs
uses XMLHttpRequest to get the source of coffee files, which may not work on some setups (e.g. because assets are hosted on static.example.com while pages are at www.example.com)@arnaud-lb, I see. I can commit the proposal changes from this PR. Should it be enough to support CoffeeScript
? Thanks!
@IgorTimoshenko yes, this change is enough to support coffee-script :)
@arnaud-lb, note that the proposed changes won't work with the r.js
filter for Assetic.
This changes the output path to use a
.js
extension. This allows to use the bundle with.coffee
scripts.