Skip to content
Browse files

Improves makefile

  • Loading branch information...
1 parent 9056477 commit e7bcd7ec8ef93c978b0ac10d8b2101b3fe0d4b6a @ixti ixti committed Dec 15, 2011
Showing with 4 additions and 2 deletions.
  1. +4 −2 Makefile
View
6 Makefile
@@ -1,4 +1,4 @@
-PATH := ./node_modules/.bin:${PATH}
+PATH := $(shell pwd)/node_modules/.bin:${PATH}
PROJECT := $(notdir ${PWD})
TMP_PATH := /tmp/${PROJECT}-$(shell date +%s)
@@ -10,6 +10,8 @@ CURR_HEAD := $(firstword $(shell git show-ref --hash HEAD | cut --bytes=-6) mas
GITHUB_NAME := nodeca/js-yaml
SRC_URL_FMT := https://github.com/${GITHUB_NAME}/blob/${CURR_HEAD}/{file}\#L{line}
+JS_FILES := $(shell find ./lib -type f -name '*.js' -print)
+
lint:
@if test ! `which jslint` ; then \
echo "You need 'jslint' installed in order to run lint." >&2 ; \
@@ -20,7 +22,7 @@ lint:
# (indent) -> indentation level (2 spaces)
# (nomen) -> tolerate underscores in identifiers (e.g. `var _val = 1`)
# (bitwise) -> tolerate bitwise operators (used in base64)
- jslint --node --nomen --bitwise --indent=2 ./lib/*.js ./lib/**/*.js
+ jslint --node --nomen --bitwise --indent=2 ${JS_FILES}
test: test-issues test-functional

0 comments on commit e7bcd7e

Please sign in to comment.
Something went wrong with that request. Please try again.