Skip to content
This repository has been archived by the owner on Feb 19, 2022. It is now read-only.

Commit

Permalink
Add Makefile
Browse files Browse the repository at this point in the history
- remove direct coffee-script dependency
- remove old prepublish script
  • Loading branch information
grncdr committed Apr 8, 2012
1 parent 4ca3469 commit 833e24f
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 27 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
node_modules
.DS_Store
.build
lazorse.js
lib
30 changes: 30 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
.PHONY : test

PATH := ./node_modules/.bin/:$(PATH)
LIBS = $(subst src,lib,$(subst coffee,js,$(wildcard ./src/*.coffee)))
HEAD = $(shell git describe --contains --all HEAD)
REPORTER ?= dot

all : lazorse.js $(LIBS)

lib/%.js : src/%.coffee
@mkdir -p lib
@coffee -pbc $< > $@

test : all
@mocha --compilers coffee:coffee-script --reporter $(REPORTER)

%.js : %.coffee
@coffee -pbc $< > $@

clean :
@rm *.js lib/*.js || true

pages :
$(MAKE) -C doc html

release : test pages
git checkout gh-pages
cp -R doc/.build/html/ .
git commit -a -m v$(npm_package_version)
git checkout $(HEAD)
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,17 @@
"node": ">=0.4.0"
},
"dependencies": {
"coffee-script": "~1.2.0",
"connect": "~2.0.0",
"uri-template": "~0.3.0"
},
"devDependencies": {
"mocha": "~1.0.0",
"coffee-script": "~1.2.0",
"consolidate": "0.1.0"
},
"scripts": {
"test": "mocha",
"prepublish": "coffee prepublish.coffee"
"test": "make test",
"prepublish": "make release"
},
"optionalDependencies": {}
}
24 changes: 0 additions & 24 deletions prepublish.coffee

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 833e24f

Please sign in to comment.