javascript 如何在 Ubuntu (12.04) 上正确安装最新版本的 CoffeeScript

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/17143021/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-27 07:14:35  来源:igfitidea点击:

How to install properly the latest version of CoffeeScript on Ubuntu (12.04)

javascriptnode.jscoffeescriptubuntu-12.04npm

提问by Egel

How to install step by step the latest version of CoffeeScript on Ubuntu 12.04.

如何在 Ubuntu 12.04 上逐步安装最新版本的 CoffeeScript。

The current version of CoffeeScript is 1.6.3

CoffeeScript 的当前版本是 1.6.3

Any comments are be very useful.

任何评论都是非常有用的。

采纳答案by pl47ypus

i recommend using nvm(node version manager). it helps maintaining several versions of node and switching between them. it is also less OS intrusive.

我建议使用nvm(节点版本管理器)。它有助于维护多个版本的节点并在它们之间切换。它对操作系统的侵入性也更少。

after installing nvm, just run 'npm install -g coffeescript' (no sudo is required).

安装 nvm 后,只需运行“npm install -g coffeescript”(不需要 sudo)。

回答by Ajay

Install needed packages

安装需要的包

$ sudo apt-get install git-core curl build-essential openssl libssl-dev

Install node.js

安装 node.js

$ git clone https://github.com/nodejs/node.git && cd node
$ ./configure
$ make
$ sudo make install
$ cd

Install npm

安装 npm

$ curl http://npmjs.org/install.sh | sudo sh

Install CoffeeScript

安装 CoffeeScript

$ sudo  npm install -g coffeescript

回答by Egel

First, need to update the system and install necessary programs

一、需要更新系统并安装必要的程序

sudo apt-get update
sudo apt-get install git-core curl build-essential openssl libssl-dev

Next, install globally using git the latest stable(master) node and npm

接下来,使用 git 最新的 stable(master) 节点和 npm 全局安装

sudo git clone git://github.com/joyent/node.git
cd node/
sudo ./configure
sudo make
sudo make install

Now, check the versions of npm and node

现在,检查 npm 和 node 的版本

npm -v     #my version 1.2.25
node -v    #my version v0.11.3-pre

After installed npm and node it's time to last piece - CoffeeScript

安装 npm 和 node 后,是时候做最后一件了 - CoffeeScript

sudo npm install -g coffeescript

Check the version and that's all :)

检查版本,仅此而已:)

coffee -v  #my version 1.6.3