Coffeescript AMD doesn't work with rootExports / noConflict #8

Closed
anodynos opened this Issue Dec 7, 2012 · 1 comment

Comments

Projects
None yet
1 participant
@anodynos
Owner

anodynos commented Dec 7, 2012

Actually its a little bit worse : AMD files compiled with coffeescript IFI are wrongly recognised as nodejs.
The generally work like that, but no rootExport / noConflict.

The remedy is to use -bare, which works ok most times : it can rarelly break (only when using AMD), cause Coffeescript may put a var __slice = [].slice; outside define([],fn)

Better remedy: use nodejs format when using Coffeescript. They work as good converted by uRequire as UMD or AMD.
If you HAVE TO author in AMD, dont use rootExports for now or workaround the coffeescript line that is left outside `define([],...)

Future fix:

  • uRequire will recognise the coffeescript IFI format and will read things before define() and stick them before actual factorybody... So no -bare will be needed and it will work fine.
@anodynos

This comment has been minimized.

Show comment
Hide comment
@anodynos

anodynos Sep 24, 2013

Owner

Fixed in 7ebeab5

AMD & coffee/ls/coco/iced IFI are recognised and play extra well - in combined template all the generated code is merged to save space. Dont use -bare anymore - its better to leave the coffee/ls/coco compilation to urequire's ResourceConverters.

Owner

anodynos commented Sep 24, 2013

Fixed in 7ebeab5

AMD & coffee/ls/coco/iced IFI are recognised and play extra well - in combined template all the generated code is merged to save space. Dont use -bare anymore - its better to leave the coffee/ls/coco compilation to urequire's ResourceConverters.

@anodynos anodynos closed this Sep 24, 2013

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