Registry / devops / coffee-formatter-cli

coffee-formatter-cli

JSON →
library0.0.4jsnpmunverified

A command-line tool for formatting CoffeeScript source code. Version 0.0.4 (2017) is the latest release; the package has seen no updates since and is likely abandoned. It installs globally and works with Node >=0.11.0. Differentiators: simple CLI interface for formatting CoffeeScript files; no configuration options or customization. Alternative tools like decaffeinate and prettier-plugin-coffeescript offer more features and maintenance.

npm install coffee-formatter-cli
INSTALL
IMPORT
SIG · COFFEE-FORMATTER-C
C
coffee-formatter-cli
devopsjavascriptv0.0.4
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

CLI tool
npx coffee-formatter <file>
npm install --save coffee-formatter (wrong package name)
This is a CLI tool, not a library. Install globally with -g or use npx.
Programmatic API
No exports; use child_process.exec('coffee-formatter file.coffee', ...)
require('coffee-formatter-cli')
Package does not expose a programmatic API.
Binary
coffee-formatter input.coffee
coffee-formatter-cli (binary name is 'coffee-formatter')
Binary name defined in package.json bin field is 'coffee-formatter'.

Install globally and format a CoffeeScript file using the CLI, with options to output to stdout or overwrite the original.

npm install -g coffee-formatter-cli # Format a file in place coffee-formatter myfile.coffee # Output to stdout coffee-formatter myfile.coffee --stdout # Overwrite original file (default) coffee-formatter myfile.coffee --overwrite
Debug
Known issues
deprecatedPackage has not been updated since 2017 and depends on old CoffeeScript versions.
fix
Consider using decaffeinate or prettier-plugin-coffeescript for modern CoffeeScript formatting.
affects: <=0.0.4
gotchaBinary name is 'coffee-formatter', not 'coffee-formatter-cli'.
fix
Run 'coffee-formatter' not 'coffee-formatter-cli'.
affects: >=0.0.1
gotchaNo programmatic API; cannot require() the package.
fix
Use child_process.spawn() or exec() to invoke the CLI tool.
affects: >=0.0.1
gotchaOptions --stdout and --overwrite are undocumented flags found in source; may not work as expected.
fix
Check source code or experiment with flags.
affects: 0.0.4
Errors
Common errors & fixes
Command not found: coffee-formatter
Global install not in PATH, or not installed with -g.
fix
Install globally: npm install -g coffee-formatter-cli, or use npx coffee-formatter.
Error: Cannot find module 'coffee-script'
Missing dependency coffee-script when running without proper installation.
fix
Ensure coffee-formatter-cli is installed globally: npm install -g coffee-formatter-cli (coffee-script is a dependency and should be installed automatically).
Upgrade
Version history
0.0.4latest on npm
Audit
Dependencies
coffee-scriptrequiredUsed to parse and generate CoffeeScript code
Agent activity
4 hits · last 30 days
node
4
Resources
coffee-formatter-cli — npm install coffee-formatter-cli · libregistry