precc

0.1.2 • Public • Published

precc

precc is a pre-processor for coffeescript. It allows to include other coffee-script files with proper indentation handling.

Syntax

To include another file into your script, use the following command:

#_include filename 

This includes the file filename.coffee at the current position.

Indentation handling

Assume you have the following script:

multiply = (x, y) ->
  #_include method 

and method.coffee contains:

* y

then the result is:

multiply = (x, y) ->
  #----------------------------------------------------------------------------# 
  # from <./method.coffee> 
  x * y
  #----------------------------------------------------------------------------# 

Usage

precc comes as a command-line tool called precc. Invoked without any argument, it reads from standard input. Multiple files as arguments are concatenated together.

Dependencies (1)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i precc

    Weekly Downloads

    0

    Version

    0.1.2

    License

    ISC

    Last publish

    Collaborators

    • zurborg