Skip to content

Commit

Permalink
Refine package.json and tools/task.mk
Browse files Browse the repository at this point in the history
  • Loading branch information
Constellation committed Jan 9, 2013
1 parent 3ac150f commit e9c11aa
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"url": "http://github.com/Constellation/ibrik.git"
},
"dependencies": {
"CoffeeScriptRedux": "git://github.com/michaelficarra/CoffeeScriptRedux.git#6e83e6f1cd3d63a2096c160d57fc8ee1ab09ccc3",
"coffee-script-redux": "git://github.com/michaelficarra/CoffeeScriptRedux.git#6e83e6f1cd3d63a2096c160d57fc8ee1ab09ccc3",
"istanbul": "*",
"optimist": "*",
"escodegen": "*",
Expand All @@ -42,6 +42,8 @@
}],
"scripts": {
"test": "./node_modules/.bin/mocha",
"install": "make -f tools/task.mk build"
"install": "npm run-script build",
"build": "make -f tools/task.mk build",
"watch": "make -f tools/task.mk watch"
}
}
7 changes: 3 additions & 4 deletions tools/task.mk
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,22 @@ WATCH = $(COFFEE) ./tools/watch.coffee

LIBDIR = lib
SRCDIR = src
vpath %.coffee $(SRCDIR)

SRC = $(wildcard $(SRCDIR)/*.coffee)
LIB = $(patsubst $(SRCDIR)/%.coffee,$(LIBDIR)/%.js,$(SRC))
LIB = $(SRC:$(SRCDIR)/%.coffee=$(LIBDIR)/%.js)

.SUFFIXES: .coffee .js
.PHONY: all build watch clean

all: build
build: $(LIB)

$(LIB): | $(LIBDIR)
$(LIB): $(LIBDIR)

$(LIBDIR):
@mkdir -p "$@"

$(LIBDIR)/%.js: %.coffee
$(LIBDIR)/%.js: $(SRCDIR)/%.coffee $(LIBDIR)
$(COFFEE) -j < "$<" > "$@"

clean:
Expand Down

0 comments on commit e9c11aa

Please sign in to comment.