百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
D

depercolator

> 编程语言
开源

用于将 Coffeescript 转换为 idiomatic JavaScript 和 JSX 的工具

99 stars0 点赞4 次浏览
访问官网GitHub

工具介绍

用于将 Coffeescript 转换为 idiomatic JavaScript 和 JSX 的工具

Depercolator

This tool is a swiss army knife for converting coffeescript files to javascript. It relies on several other tools to ease the conversion process and create idiomatic javascript and JSX.

  • cjsx-transform for adding jsx support to decaffeinate
  • decaffeinate converts coffeescript to idiomatic javascript
  • react-codemod for converting React.createElement calls back to JSX
  • prettier-eslint For final formatting and cleanup

Learn more from our blog on converting our React codebase from CoffeeScript to ES6.

Installation

npm i -g depercolator

or

yarn global add depercolator

Usage

depercolate  [options]

Options

  • -o, --output [filepath]: Change path of resulting file (defaults to same path as original with a different extension)
  • --skip-prettier: Do not reformat the file with prettier (default is false)

Decaffeinate options

Most options from decaffeinate can be passed through to the underlying command

  • --modernize-js: Treat the input as JavaScript and only run the JavaScript-to-JavaScript transforms, modifying the file(s) in-place.
  • --literate: Treat the input file as Literate CoffeeScript.
  • --disable-suggestion-comment: Do not include a comment with followup suggestions at the top of the output file.
  • --no-array-includes: Do not use Array.prototype.includes in generated code.
  • --use-optional-chaining: Use the upcoming optional chaining syntax for operators like ?..
  • --use-js-modules: Convert require and module.exports to import and export.
  • --loose-js-modules: Allow named exports when converting to JS modules.
  • --safe-import-function-identifiers: Comma-separated list of function names that may safely be in the import/require section of the file. All other function calls will disqualify later requires from being converted to imports.
  • --prefer-let: Use let instead of const for most variables in output code.
  • --loose: Enable all --loose... options.
  • --loose-default-params: Convert CS default params to JS default params.
  • --loose-for-expressions: Do not wrap expression loop targets in Array.from.
  • --loose-for-of: Do not wrap JS for...of loop targets in Array.from.
  • --loose-includes: Do not wrap in Array.from when converting in to includes.
  • --loose-comparison-negation: Allow unsafe simplifications like !(a > b) to `a on the last line instead of at a new line.
  • --parser : Which parser to use
  • --print-width : The line length where Prettier will try wrap.
  • --no-prose-wrap: Do not wrap prose. (markdown)
  • --no-semi: Do not print semicolons, except at the beginning of lines which may need them.
  • --single-quote: Use single quotes instead of double quotes.
  • --tab-width : Number of spaces per indentation level.
  • --trailing-comma : Print trailing commas wherever possible when multi-line.
  • --use-tabs: Indent with tabs instead of spaces.

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

JavaScriptproduct

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言