The repo for the johnny-five.io website.
- node
- npm
- sass gem (which requires ruby)
brew install node
gem install sass
npm install
Content displayed on johnny-five.io is sourced from two other repos:
- https://github.com/rwaldron/johnny-five.git
- Example programs
- Breadboard images
- Breadboard fritzing files
- tpl/programs.json
- tpl/titles.json
- Example programs
- https://github.com/rwaldron/johnny-five.wiki.git
- API Documentation
The content is consumed and processed via grunt tasks that output the website-ready versions of the content to the public/ directory.
Bootstrap site content from remote repos:
grunt bootstrap
Regenerate all local content from remote content sources:
grunt regen
Development automation and server:
grunt && grunt dev
- Tasks
devRun theconnect,launch, andwatchtasks.connect: connect the serverlaunch: open the site in a browser
bootstrap: Run theclean:deps,gitcloneandcopytasks.- Clean out remote content source dependencies and clone the the latest master branch of the johnny-five and johnny-five.wiki repos into the
src/directory. Copy static resources topublic/
- Clean out remote content source dependencies and clone the the latest master branch of the johnny-five and johnny-five.wiki repos into the
regenRunindex,articles-from-rss,examples-list,examples,api-docsandplatform-supporttasks.indexgeneratespublic/index.html- Materials & Sources:
src/platforms-plugins.jsonsrc/tpl/.index.htmlsrc/css/style.scsssrc/img/*src/img/platforms/*
- Materials & Sources:
articles-from-rssgenerates article lists from a given set of rss feed targets.- Materials & Sources:
tpl/.articles.htmltpl/rss-list.html
- Materials & Sources:
examples-listgeneratespublic/examples.html- Materials & Sources:
tpl/.examples.htmlsrc/johnny-five/README.md
- Materials & Sources:
examplesgeneratespublic/examples/*.html- Materials & Sources:
tpl/.example-content.htmlsrc/johnny-five/README.mdsrc/johnny-five/tpl/programs.jsonsrc/johnny-five/tpl/titles.jsonsrc/johnny-five/docs/breadboard/*.png
- Materials & Sources:
api-docsgeneratespublic/api.htmlandpublic/api/*.html- Materials & Sources:
tpl/.api.htmltpl/.api-content.htmlsrc/johnny-five.wiki/Home.mdsrc/johnny-five.wiki/[API PAGES].mdsrc/johnny-five/docs/breadboard/*.png
- Materials & Sources:
platform-supportgeneratespublic/platform-support.html- Materials & Sources:
tpl/.platform-support.htmltpl/.platform-variant.htmlsrc/platforms-plugins.json- Images in
src/img/platforms/- 500x500 PNG
- 270 pixels/inch
- This is the Fritzing default, it looks nice on retina displays.
- Materials & Sources:
Tagging a release with the prefix prod- (e.g. prod-v123 or prod-1450284359) will automatically trigger a deploy to johnny-five.io. Merging to master will deploy to staging.johnny-five.io.
In the (hopefully) rare instance you need to manually deploy the steps are below.
- Run
./deploy/run-playbook.sh deploy vagrant local=true commit=_____where_____is the local commit ref (branchname, SHA, etc) to deploy. For a complete list of options, see the deploy role docs.- Simulate deploying to production or staging by adding
env=productionorenv=stagingto the end of this command.
- Simulate deploying to production or staging by adding
- Browse to http://people.loc/
- Run
./deploy/run-playbook.sh deploy staging commit=_____where_____is the commit ref (branchname, SHA, etc) in GitHub. Defaults toHEAD. For a complete list of options, see the deploy role docs. - Enter your dploy sudo password when asked.
- Run
./deploy/run-playbook.sh deploy production commit=_____where_____is the commit ref (branchname, SHA, etc) in GitHub. Defaults toHEAD. For a complete list of options, see the deploy role docs. - Enter your dploy sudo password when asked.