coffee-fmt
a `gofmt` inspired Coffeescript formatter/beautifier.
Last updated 5 years ago by sterpe .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install coffee-fmt 
SYNC missed versions from official npm registry.

coffee-fmt

a gofmt inspired Coffeescript formatter/beautifier.

npm install -g coffee-fmt

coffee-fmt --indent_style [space|tab] \
	 --indent_size [Integer, ignored when using tabs] \
	 --debug=true (This will print all parse info to stdout as well, defaults to false)
	 -i filename.coffee >> transformed.coffee

###js api###

	var fmt = require('coffee-fmt')
	, fs = require('fs')
	, coffee
	, options
	;

	options = {
		tab: '\t',
		newLine: '\n'
	};

	coffee = fs.readFileSync('filename.coffee');
	coffee = coffee.toString();

	try {
		coffee = fmt.format(coffee, options);
	} catch (e) {
		//Whoops...something went wrong, error details logged to console.
	}

	console.log(coffee);

Current Tags

  • 0.12.0                                ...           latest (5 years ago)

21 Versions

  • 0.12.0                                ...           5 years ago
  • 0.11.0                                ...           5 years ago
  • 0.10.2                                ...           5 years ago
  • 0.10.1                                ...           5 years ago
  • 0.10.0                                ...           5 years ago
  • 0.7.0                                ...           5 years ago
  • 0.6.3                                ...           5 years ago
  • 0.6.2                                ...           5 years ago
  • 0.6.1                                ...           5 years ago
  • 0.6.0                                ...           5 years ago
  • 0.5.2                                ...           5 years ago
  • 0.5.1                                ...           5 years ago
  • 0.5.0                                ...           5 years ago
  • 0.4.2                                ...           5 years ago
  • 0.4.1                                ...           5 years ago
  • 0.4.0                                ...           5 years ago
  • 0.2.0                                ...           5 years ago
  • 0.1.4                                ...           5 years ago
  • 0.1.3                                ...           5 years ago
  • 0.1.2                                ...           5 years ago
  • 0.1.0                                ...           5 years ago
Maintainers (1)
Downloads
Today 0
This Week 3
This Month 3
Last Day 1
Last Week 18
Last Month 67
Dependencies (4)
Dev Dependencies (2)
Dependents (1)

Copyright 2014 - 2016 © taobao.org |