elspify

browserify transform to compile eslisp


Keywords
browserify-transform
License
MIT
Install
npm install elspify@1.0.1

Documentation

eslispify Travis-CI Status

browserify transform for eslisp

Installation

Install package with npm and add it to your development dependencies:

npm install --save-dev eslispify

Usage

  • index.esl:
; Only include given statement if `$DEBUG` environment variable is set
(macro debug
 (lambda (statement)
  (return (?: (. process env DEBUG)
              statement
              null))))

(var fib ; Fibonacci number sequence
   (lambda (x)
    (debug ((. console log) (+ "resolving number " x)))
    (switch x
     (0 (return 0))
     (1 (return 1))
     (default (return (+ (fib (- x 1)) (fib (- x 2))))))))

Then pass the transform when compiling your app:

$ browserify -t eslispify index.esl > index.js

License

MIT