Merge pull request #30 from braintree/demo-page

Add Demo page
This commit is contained in:
Quinn J Neumiiller 2017-01-19 09:10:42 -08:00 коммит произвёл GitHub
Родитель 943157b6ff a1d296b39c
Коммит 53613bd8c8
3 изменённых файлов: 26 добавлений и 1 удалений

Просмотреть файл

@ -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

Просмотреть файл

@ -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",

20
publish-gh-pages.sh Executable file
Просмотреть файл

@ -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!'