I'm trying to use CoffeeScript in the front-end part of my code. I've not been able to locate the precise location of the JavaScript script for running CoffeeScript on the front-end. Can you help?
2 Answers
This is a very simple issue to solve, and I believe it has already been posted on Stack Overflow. For your knowledge, however, it would be correct to view the documentation on CoffeeScript's website, specifically here.
The URL to the compiler is here.
Once you've added the script to this hyperlink, add this code and you're good!
<script type="text/coffeescript"> # Your code </script>
1 Comment
Hack Casts
Thanks for the URL to the script. I got the CoffeeScript working on the front-end!
Usually people run node on local machine and node transpiles the coffeescript to javascript for you.
2 Comments
Paul Lewallen
Inserting the coffeescript into a view isn't a good practice because it eventually has to be converted into javascript by the client machine. It's best to transpile into javascript before you deploy for public usage.
Hack Casts
I only want to use it for quick development, but thank you!