Introduction to CoffeeScript

Hey guys!

Long time no see 🙂

Today I’ll be a little bit more serious than usual and talk about some business.

There is a language called CoffeeScript, which I won’t explain what it is.

Here is how to install it in Ubuntu, Linux Mint etc.

Step-by-step:

FIrstly, go coffeescript.org‘s installation anchor.

Screenshot from 2015-08-28 22:57:58

Second, go to source repository and clone the project somewhere in your computer (the marked text in bottom-right).

Screenshot from 2015-08-28 23:00:25

command: git clone https://github.com/jashkenas/coffeescript.git

or

Follow the “releases” link and download the one at the top.

Screenshot from 2015-08-28 23:03:28

In this case, 1.9.3. Then extract it somewhere.

Third, follow the instructions in the first image. That is:

Go to the folder where you created coffeescript folder. (Where coffeescript folder resides).

To install the latest master CoffeeScript compiler with npm.

If you don’t have npm, first install it using the command in the first line.

sudo apt-get install npm
npm install -g coffeescript

You will probably get an error like this:

Screenshot from 2015-08-28 23:15:29

So, go do this command:

sudo su

Then run this again:

npm install -g coffeescript

Check if it works by trying to run coffee.

coffee

You will probably get this error:

/usr/bin/env: node: No such file or directory

So, you need to create something called node for the CoffeeScript.

Link the nodejs command to node

 sudo ln -s /usr/bin/nodejs /usr/bin/node

Then try again:

coffee
Voila!

Now you have a running coffeescript compiler!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s