git clone https://github.com/ouspg/urlhandlers.git
cd urlhandlers/web
../osx/handlers-list.py > handlers.json
cp db/handlerinfo.json db/handlerinfo.json.orig
../bin/handlers-merge.py db/handlerinfo.json.orig db/handlerpresets.json \
db/handlerurls.json handlers.json > db/handlerinfo.json
git commit -a
git push
sudo easy_install pip
sudo pip install flake8
sudo pip install tox
# Install Node.js from https://nodejs.org/en/download/ and then
cd <projectdir>
npm install
node_modules/.bin/jspm install
We use JSPM for the front/client-side JavaScript dependency bundling.
Optionally install Atom and then these Atom packages:
apm install linter
apm install linter-flake8
apm install linter-htmlhint
apm install linter-jsonlint
apm install linter-eslint
apm install linter-node-markdownlint
Bundling JavaScript dependencies:
$(npm bin)/jspm bundle handlers --inject
Unbundling (back to the drawing board):
$(npm bin)/jspm unbundle
Adapted from the JSPM CLI Production Workflows documentation.
Random example of debugging the JavaScript modules from the console:
SystemJS.import('./browserinfo').then(function(_) {
console.log(_.browserinfo.shortinfo());
});
Build a stand-alone JavaScript bundle and publish web-substree based on Deploying a subfolder to GitHub Pages instructions:
$(npm bin)/jspm bundle-sfx handlers web/bundle-sfx.js
# modify index.html to load bundle-sfx.js (only)
git commit -a
git push
git subtree push --prefix web origin gh-pages
... and go to http://.github.io/.