mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-04-23 14:02:08 +02:00

Co-authored-by: bl-ue <54780737+bl-ue@users.noreply.github.com> Co-authored-by: Starbeamrainbowlabs <sbrl@starbeamrainbowlabs.com>
20 lines
540 B
Markdown
20 lines
540 B
Markdown
# decaffeinate
|
|
|
|
> Move your CoffeeScript source to modern JavaScript.
|
|
> More information: <https://decaffeinate-project.org>.
|
|
|
|
- Convert a CoffeeScript file to JavaScript:
|
|
|
|
`decaffeinate {{path/to/file.coffee}}`
|
|
|
|
- Convert a CoffeeScript v2 file to JavaScript:
|
|
|
|
`decaffeinate --use-cs2 {{path/to/file.coffee}}`
|
|
|
|
- Convert require and `module.exports` to import and export:
|
|
|
|
`decaffeinate --use-js-modules {{path/to/file.coffee}}`
|
|
|
|
- Convert a CoffeeScript, allowing named exports:
|
|
|
|
`decaffeinate --loose-js-modules {{path/to/file.coffee}}`
|