diff --git a/README.md b/README.md index b441a55..d5bf3a2 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,10 @@ Restricted Input Allow restricted character sets in `input` elements. +## Demo + +Try the latest version of Restricted Input [here](https://braintree.github.io/restricted-input/). + ## Features - Disallow arbitrary chars based on patterns diff --git a/package.json b/package.json index 889c806..1ad4135 100644 --- a/package.json +++ b/package.json @@ -30,7 +30,8 @@ "test:watch": "karma start config/karma.js", "test:unit": "karma start config/karma.js --single-run", "test:integration": ". ./.env && bundle exec rake sauce:spec test_files=spec", - "test:all": "npm run test && npm run test:integration" + "test:all": "npm run test && npm run test:integration", + "publish:demo": "./publish-gh-pages.sh" }, "devDependencies": { "browserify": "13.0.1", diff --git a/publish-gh-pages.sh b/publish-gh-pages.sh new file mode 100755 index 0000000..0065353 --- /dev/null +++ b/publish-gh-pages.sh @@ -0,0 +1,20 @@ +#!/bin/bash +set -e # aborts if there are errors +set -u # errors if you use an undefined variable +set -o pipefail # errors if a pipe fails + +git checkout master + +npm run build + +cp test/support/index.html dist/ + +git checkout gh-pages + +mv dist/* . + +git add restricted-input.js +git add index.html +git commit -ve -m 'Update demo page for restricted-input' + +echo 'You can now `git push` to gh-pages!'