
Meteor Cookbook
By :

Many people prefer CoffeeScript to the standard JavaScript syntax. If you are one of those people with a preference, Meteor has you covered. This recipe will show you how to quickly enable CoffeeScript in your development environment.
Nothing is needed to prepare for this recipe, other than having Meteor installed, and a project created so that you can begin using CoffeeScript.
To use CoffeeScript, proceed with the following steps:
$ meteor add coffeescript
You should see the following response in the terminal window:
coffeescript added, version 1.0.
CoffeeScript is now installed and ready to go!
You can test the installation by creating a .coffee
file and adding a script (for example, add test.coffee
to your client
folder). When you start your Meteor application with the meteor
command, the script should execute as designed.
You can uninstall CoffeeScript easily. Simply execute the following terminal command:
$ meteor remove coffeescript
Behind the scenes, the CoffeeScript package you just installed looks for any and all *.coffee
and *.litcoffee
files, compiles them into native JavaScript, and then bundles them for use in your running Meteor application.
As with all other files in a running Meteor application, changes to your CoffeeScript are immediately processed.
Change the font size
Change margin width
Change background colour