coffeescript - Is is possible to load .coffee script file to browser and execute? -


i trying load coffee script inside sample.coffee file along coffee-script.js file , perform simple operations on html. not able load sample.coffee file.

<!doctype html> <html xmlns="http://www.w3.org/1999/xhtml">   <head>     <title></title>     <script src="sample.coffee" type="text/coffeescript"></script>           <script src="coffee-script.js" type="text/javascript"></script>   </head>   <body>   </body> </html>  

here coffeescript code inside sample.coffee

message = "welcome coffeescript" alert message 

i referred blog http://forgivingworm.wordpress.com/2010/09/27/running-coffeescript-in-browser/

i trying run in mvc4 project on .cshtml. running under ms world.

i not sure if possible or not? insight appreciated.

i dont think work tried it. need requirejs , coffeescript loader @ https://github.com/jrburke/require-cs.

however discourage , rather have compiled before loading browser (require.js encouraged though). might find grunt.js helpful "building" app before deploying.


Comments

Popular posts from this blog

Delphi XE2 Indy10 udp client-server interchange using SendBuffer-ReceiveBuffer -

Qt ActiveX WMI QAxBase::dynamicCallHelper: ItemIndex(int): No such property in -

Enable autocomplete or intellisense in Atom editor for PHP -