A collection of useful resources to help you master CoffeeScript
To create a module that can be loaded with Bob = require './bob'
, put this code in bob.coffee
:
class Bob
module.exports = Bob
You can find more information about modules in the Node documentation.
If you have a paid version of Visual Studio, you can download a Visual Studio solution that is already set up to work with CoffeeScript and the other languages that Visual Studio supports.
C:\src\exercises
exercism configure --key=YOUR_API_KEY
exercism configure --dir=C:\src\exercises
exercism fetch coffeescript
To work with CoffeeScript in Visual Studio, you should install the Web Essentials extension. It will also make working with Javascript much easier.
You can run the unit tests from a node.js command line using the batch file in the project.
C:\Src\exercises\coffeescript> test example\bob_test.spec.coffee
.................
Finished in 0.02 seconds
17 tests, 17 assertions, 0 failures, 0 skipped
If you do not see any output from running the tests, you are likely not in a Node.js command prompt.
Check out our learning resources.