A Bystander plugin for compiling CoffeeScript
CoffeeScript
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
docs
lib
src
test
.gitignore
Makefile
README.md
package.json

README.md

By-CoffeeScript

A Bystander plugin to auto-compile CoffeeScript files on file change events.

Note it doesn't save compiled js code to js files, you need by-write2js plugin to do that.

By-CoffeeScript plugin compiles CoffeeScript files to Javascript and broadcasts if the compilation is successful. This plugin utilizes other handy plugins such as by-write2js, by-coffeelint, by-docco and by-mocha.

Installation

To install by-coffeescript,

sudo npm install -g by-coffeescript

Options

noCompile : an array of glob patterns for files to ignore.

By-CoffeeScript uses minimatch without matchBase option to match glob patterns.

Examples

Ignoring files under ignore and nocompile directories.

// .bystander config file
.....
.....
  "plugins" : ["by-coffeescript"],
  "by" : {
    "coffeescript" : {
      "noCompile" : ["**/ignore/*", "**/nocompile/*"]
    }
  },
.....
.....

Broadcasted Events for further hacks

compiled : successfully compiled the given coffee file
compile error : failed to compile the given coffee file
nofile : failed to find the given coffee file

See the annotated source for details.

Running Tests

Run tests with mocha

make

License

By-CoffeeScript is released under the MIT License. - see the LICENSE file