Skip to content

Commit

Permalink
Merge pull request #10 from groupon/jk/switch-to-coffee-script
Browse files Browse the repository at this point in the history
Switch to coffee-script for parsing
  • Loading branch information
jkrems committed Dec 3, 2014
2 parents 170fdaa + 349f4fe commit a8c5541
Show file tree
Hide file tree
Showing 12 changed files with 541 additions and 399 deletions.
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
language: node_js
node_js:
- "0.8"
- "0.10"
- "0.11"
15 changes: 3 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,21 +1,12 @@

SRC = $(shell find src -name "*.coffee" -type f | sort)
LIB = $(SRC:src/%.coffee=lib/%.js)

COFFEE=node_modules/.bin/coffee --js

all: clean setup test check-checkout-clean

build: $(LIB)
@./node_modules/.bin/npub prep lib
build:
@./node_modules/.bin/npub prep
@./node_modules/.bin/coffee -cbo lib src

prepublish:
./node_modules/.bin/npub prep

lib/%.js: src/%.coffee
dirname "$@" | xargs mkdir -p
$(COFFEE) <"$<" >"$@"

clean:
rm -rf lib node_modules

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Advantages of `cson-safe`:

* A strict subset of CSON that allows only data
* Interface is identical to JSON.{parse,stringify}
* Free of `eval` and intermediate string representations
* Does not run the code, free of intermediate string representations
* Sane parse error messages with line/column

In addition of pure data it allows for simple arithmetic expressions like
Expand Down
205 changes: 12 additions & 193 deletions lib/cson-safe.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit a8c5541

Please sign in to comment.