diff --git a/.travis.yml b/.travis.yml index 00d7d84..218c76c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,5 @@ language: node_js node_js: - "0.10" -before_script: "make dev-deps" +before_script: "npm install" script: "make test" diff --git a/Makefile b/Makefile index d25d339..484db25 100644 --- a/Makefile +++ b/Makefile @@ -15,24 +15,18 @@ GITHUB_PROJ := nodeca/${NPM_PACKAGE} help: echo "make help - Print this help" echo "make lint - Lint sources with JSHint" + echo "make test - Run tests" + echo "make cover - Create coverage report" + echo "make doc - Generate documentation" + echo "make browserify - Build browserified packages" echo "make publish - Set new version tag and publish npm package" lint: - if test ! `which jshint` ; then \ - echo "You need 'jshint' installed in order to run lint." >&2 ; \ - echo " $ make dev-deps" >&2 ; \ - exit 128 ; \ - fi jshint . --show-non-errors test: lint - @if test ! `which mocha` ; then \ - echo "You need 'mocha' installed in order to run tests." >&2 ; \ - echo " $ make dev-deps" >&2 ; \ - exit 128 ; \ - fi mocha cover: @@ -40,18 +34,13 @@ cover: istanbul cover node_modules/.bin/_mocha -- -t 30000 -R spec doc: - @if test ! `which ndoc` ; then \ - echo "You need 'ndoc' installed in order to generate docs." >&2 ; \ - echo " $ npm install -g ndoc" >&2 ; \ - exit 128 ; \ - fi rm -rf ./doc ndoc --link-format "{package.homepage}/blob/${CURR_HEAD}/{file}#L{line}" browserify: - if test ! `which browserify` ; then npm install browserify ; fi - if test ! `which uglifyjs` ; then npm install uglify-js ; fi + rm -rf ./dist + mkdir dist # Browserify ( echo -n "/* ${NPM_PACKAGE} ${NPM_VERSION} ${GITHUB_PROJ} */" ; \ browserify -r ./ -s pako \ @@ -77,15 +66,6 @@ browserify: "s/(\"version\":\s*)\"[0-9]+[.][0-9]+[.][0-9]+\"/\1\"${NPM_VERSION}\"/" \ bower.json -dev-deps: - @if test ! `which npm` ; then \ - echo "You need 'npm' installed." >&2 ; \ - echo " See: http://npmjs.org/" >&2 ; \ - exit 128 ; \ - fi - npm install -g jshint - npm install - gh-pages: @if test -z ${REMOTE_REPO} ; then \ diff --git a/bower.json b/bower.json index 573c973..3f5aade 100644 --- a/bower.json +++ b/bower.json @@ -18,7 +18,7 @@ "Makefile", "index*", "lib", - "benchmarks", + "benchmark", "coverage" ] } diff --git a/package.json b/package.json index 1c5a8de..b045321 100644 --- a/package.json +++ b/package.json @@ -22,6 +22,7 @@ "uglify-js": "*", "jshint": "*", "istanbul": "*", + "ndoc": "*", "lodash": "2.4.1", "async": "0.2.10" }