1
0
Fork 0
mirror of https://github.com/jashkenas/coffeescript.git synced 2022-11-09 12:23:24 -05:00

Node comes with NPM nowadays, so there’s not really a reason to install CoffeeScript the non-NPM way

This commit is contained in:
Geoffrey 2017-02-13 20:31:58 -08:00
parent 635e207f3f
commit 37e6513c02
2 changed files with 3 additions and 29 deletions

View file

@ -45,27 +45,6 @@ run = (args, cb) ->
log = (message, color, explanation) -> log = (message, color, explanation) ->
console.log color + message + reset + ' ' + (explanation or '') console.log color + message + reset + ' ' + (explanation or '')
option '-p', '--prefix [DIR]', 'set the installation prefix for `cake install`'
task 'install', 'install CoffeeScript into /usr/local (or --prefix)', (options) ->
base = options.prefix or '/usr/local'
lib = "#{base}/lib/coffee-script"
bin = "#{base}/bin"
node = "~/.node_libraries/coffee-script"
console.log "Installing CoffeeScript to #{lib}"
console.log "Linking to #{node}"
console.log "Linking 'coffee' to #{bin}/coffee"
exec([
"mkdir -p #{lib} #{bin}"
"cp -rf bin lib LICENSE README.md package.json src #{lib}"
"ln -sfn #{lib}/bin/coffee #{bin}/coffee"
"ln -sfn #{lib}/bin/cake #{bin}/cake"
"mkdir -p ~/.node_libraries"
"ln -sfn #{lib}/lib/coffee-script #{node}"
].join(' && '), (err, stdout, stderr) ->
if err then console.log stderr.trim() else log 'done', green
)
task 'build', 'build the CoffeeScript language from source', build task 'build', 'build the CoffeeScript language from source', build

View file

@ -25,15 +25,10 @@ CoffeeScript is a little language that compiles into JavaScript.
If you have the node package manager, npm, installed: If you have the node package manager, npm, installed:
```shell ```shell
npm install -g coffee-script npm install --global coffee-script
``` ```
Leave off the `-g` if you don't wish to install globally. If you don't wish to use npm: Leave off the `--global` if you dont wish to install globally.
```shell
git clone https://github.com/jashkenas/coffeescript.git
sudo coffeescript/bin/cake install
```
## Getting Started ## Getting Started
@ -53,7 +48,7 @@ For documentation, usage, and examples, see: http://coffeescript.org/
To suggest a feature or report a bug: http://github.com/jashkenas/coffeescript/issues To suggest a feature or report a bug: http://github.com/jashkenas/coffeescript/issues
If you'd like to chat, drop by #coffeescript on Freenode IRC. If youd like to chat, drop by #coffeescript on Freenode IRC.
The source repository: https://github.com/jashkenas/coffeescript.git The source repository: https://github.com/jashkenas/coffeescript.git