CokeScript is a whitespace sensitive language that compile to JavaScript
JavaScript CSS HTML
Latest commit d2c6b06 Aug 18, 2015 Batiste Bieler Fix the virtual-node property/attribute issues
Permalink
Failed to load latest commit information.
css
dist Fix the virtual-node property/attribute issues Aug 18, 2015
doc Build virtual-dom directly into the release file Aug 11, 2015
examples Fix the virtual-node property/attribute issues Aug 18, 2015
lib
test
.gitignore
README.md
cokescript.coke Fix the virtual-node property/attribute issues Aug 18, 2015
cokescript.js Fix the virtual-node property/attribute issues Aug 18, 2015
gulpfile.js
index.html Build virtual-dom directly into the release file Aug 11, 2015
package.json Try the new virtual-dom Jun 29, 2015

README.md

CokeScript

CokeScript is a whitespace sensitive language inspired by Python and Ruby that compile to JavaScript. This project is still at an early stage. The CokeScript compiler is written in CokeScript.

How does it compare against CoffeeScript:

Style matters

API

Import CokeScript

<script src='dist/cokescript.js'></script>

or

var cokescript = require('cokescript');

Usage

cokescript.generateModule(input)

Return object of form

{
  ast:  Abstract syntax trees,
  code: JavaScript code,
  ns:   Namespace of the module
}

cokescript.generateExports(keys)

Return a commonJs module export statement with the keys provided. If none are provided the module level keys of the last compiled module will be used.

Command line tool

$ lib/coke.js
Usage of the coke command

  coke <filename> <filename N> <options>

Options
  -m or --commonjs  generate a commonJs module
  -o or --output    write the output to a single file
  -e or --execute   execute the generated javascript
  -g or --glob      select all files matched by a glob expression
  -c or --convert   convert each input file to JavaScript

Grammar parser

CokeScript use EPEG.js https://github.com/batiste/EPEG.js/