2018-07-31 20:34:53 +01:00
|
|
|
# coffee
|
|
|
|
|
2024-04-25 23:58:21 +01:00
|
|
|
> Execute CoffeeScript scripts or compiles them into JavaScript.
|
2019-06-09 00:05:29 +01:00
|
|
|
> More information: <https://coffeescript.org#cli>.
|
2018-07-31 20:34:53 +01:00
|
|
|
|
|
|
|
- Run a script:
|
|
|
|
|
|
|
|
`coffee {{path/to/file.coffee}}`
|
|
|
|
|
|
|
|
- Compile to JavaScript and save to a file with the same name:
|
|
|
|
|
|
|
|
`coffee --compile {{path/to/file.coffee}}`
|
|
|
|
|
|
|
|
- Compile to JavaScript and save to a given output file:
|
|
|
|
|
|
|
|
`coffee --compile {{path/to/file.coffee}} --output {{path/to/file.js}}`
|
|
|
|
|
2021-09-12 15:03:27 +01:00
|
|
|
- Start a REPL (interactive shell):
|
2018-07-31 20:34:53 +01:00
|
|
|
|
|
|
|
`coffee --interactive`
|
|
|
|
|
|
|
|
- Watch script for changes and re-run script:
|
|
|
|
|
|
|
|
`coffee --watch {{path/to/file.coffee}}`
|