Skip to content

Commit

Permalink
Removing unecessary dependencies and adding a publish target.
Browse files Browse the repository at this point in the history
  • Loading branch information
abernier committed Jul 6, 2012
1 parent 35d25bd commit b792979
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 25 deletions.
3 changes: 2 additions & 1 deletion .gitignore
@@ -1 +1,2 @@
node_modules/
node_modules/
lib/
Empty file added .npmignore
Empty file.
32 changes: 15 additions & 17 deletions Makefile
Expand Up @@ -2,41 +2,39 @@ SRC = ${npm_package_directories_src}
LIB = ${npm_package_directories_lib}

JQUERY_SUMODULE_DIR = lib/jquery
JQUERY = ${JQUERY_SUMODULE_DIR}/dist/jquery.js
JQUERY = $(JQUERY_SUMODULE_DIR)/dist/jquery.js

NQUERY = ${npm_package_main}
M4_NQUERY = $(basename ${NQUERY}).m4$(suffix ${NQUERY})
M4_NQUERY = $(basename $(NQUERY)).m4$(suffix $(NQUERY))

.PHONY: build
build: ${NQUERY}
build: $(NQUERY)

#.PHONY: publish
#publish:
.PHONY: publish
publish: clean build mostlyclean

${NQUERY}: ${JQUERY} ${M4_NQUERY} FORCE
m4 --prefix-builtins --include $(dir ${JQUERY}) ${M4_NQUERY} > $@
${MAKE} mostlyclean
$(NQUERY): $(JQUERY) $(M4_NQUERY)
m4 --prefix-builtins --include $(dir $(JQUERY)) $(M4_NQUERY) > $@

${JQUERY}: ${JQUERY_SUMODULE_DIR}
${MAKE} -C $^
$(JQUERY): $(JQUERY_SUMODULE_DIR)
$(MAKE) -C $^

${JQUERY_SUMODULE_DIR}: FORCE
$(JQUERY_SUMODULE_DIR): FORCE
git submodule update --init

${LIB}/%.js: ${SRC}/%.coffee
$(LIB)/%.js: $(SRC)/%.coffee
coffee --compile --print $< > $@

.PHONY: test
test: build
mocha
#.PHONY: test
#test: build

.PHONY: mostlyclean
mostlyclean:
rm -Rf ${JQUERY_SUMODULE_DIR} ${M4_NQUERY}
rm -Rf $(JQUERY_SUMODULE_DIR) $(M4_NQUERY)

.PHONY: clean
clean: mostlyclean
rm -Rf ${NQUERY}
rm -Rf $(LIB)

FORCE:

Expand Down
14 changes: 7 additions & 7 deletions package.json
@@ -1,7 +1,11 @@
{
"author": "Antoine BERNIER <antoine.bernier@gmail.com>",
"name": "nQuery",
"description": "jQuery for node",
"description": "jQuery (also) for node",
"repository": {
"type" : "git",
"url": "http://github.com/abernier/nQuery.git"
},
"version": "0.0.0",
"main": "lib/index.js",
"directories": {
Expand All @@ -15,14 +19,10 @@
"xmlhttprequest": "latest"
},
"devDependencies": {
"coffee-script": "1.3.x",
"mocha": "1.0.x",
"should": "0.6.x",
"chai": "latest"
"coffee-script": "1.3.x"
},
"scripts": {
"test": "make test",
"prepublish": "make test",
"publish": "make publish",
"_build": "make build",
"_clean": "make clean",
"_debug": "make debug"
Expand Down

0 comments on commit b792979

Please sign in to comment.