diff --git a/README.md b/README.md index 3fc3e99..601cf74 100644 --- a/README.md +++ b/README.md @@ -85,6 +85,10 @@ The optional JSON config should contain a single object with one key per argumen ## Contributing +We welcome all [issues](https://github.com/thumbsup/node-thumbsup/issues) +and [pull requests](https://github.com/thumbsup/node-thumbsup/pulls)! +Please make sure the tests are passing when submitting a code change: + ```bash -npm test +./scripts/cibuild ``` diff --git a/package.json b/package.json index 8fefa93..9dc47e8 100644 --- a/package.json +++ b/package.json @@ -18,37 +18,29 @@ "type": "git", "url": "https://github.com/rprieto/thumbsup.git" }, - "scripts": { - "test": "mocha", - "clean": "rm -rf docs/*", - "example": "node bin/thumbsup --config example.json", - "open": "open docs/index.html", - "readme": "markdown-toc README.md | awk 1 | node-injectmd -t toc -i README.md" - }, "bin": { "thumbsup": "./bin/thumbsup.js" }, "dependencies": { - "async": "^1.5.2", + "async": "^2.1.2", "exif-parser": "~0.1.9", - "fs-extra": "^0.26.4", - "glob": "^6.0.4", - "gm": "^1.21.1", + "fs-extra": "^1.0.0", + "glob": "^7.1.1", + "gm": "^1.23.0", "handlebars": "~4.0.5", - "injectmd": "^1.0.0", "less": "^2.7.1", - "lightgallery": "^1.2.14", - "lodash": "~4.0.0", - "moment": "^2.11.1", - "pad": "~1.0.0", + "lightgallery": "^1.3.5", + "lodash": "^4.16.6", + "moment": "^2.16.0", + "pad": "^1.0.2", "progress": "~1.1.8", "yargs": "^6.3.0" }, "devDependencies": { "injectmd": "^1.0.0", - "markdown-toc": "^0.12.5", - "mocha": "^3.1.0", - "should": "^11.1.0", - "sinon": "^1.17.6" + "markdown-toc": "^0.13.0", + "mocha": "^3.1.2", + "require-lint": "^1.1.2", + "should": "^11.1.1" } } diff --git a/scripts/cibuild b/scripts/cibuild new file mode 100755 index 0000000..690c21c --- /dev/null +++ b/scripts/cibuild @@ -0,0 +1,23 @@ +#!/bin/bash + +# Fail the build on any error +set -eou pipefail + +# Make sure binary package.json dependencies are available +PATH=$(pwd)/node-modules/.bin:$PATH + +echo "--- Check all dependencies in package.json" +require-lint --src bin/thumbsup.js --ignore-extra lightgallery + +echo "--- Verify lightgallery dependenciy is built in" +grep \"lightgallery\" package.json 1>/dev/null + +echo "--- Run unit tests" +mocha + +echo "--- Update CLI arguments in README" +./scripts/readme + +echo "================" +echo "Build successful" +echo "================"