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

/coffee-fmt/

    Package Sidebar

    Install

    npm i coffee-fmt

    Weekly Downloads

    119

    Version

    0.12.0

    License

    MIT

    Last publish

    Collaborators

    • sterpe