Need private packages and team management tools?Check out npm Teams »

coffee-fmt

0.12.0 • Public • Published

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);

Install

npm i coffee-fmt

DownloadsWeekly Downloads

10,735

Version

0.12.0

License

MIT

Last publish

Collaborators

  • avatar