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
dev
Run theconnect
,launch
, andwatch
tasks.connect
: connect the serverlaunch
: open the site in a browser
bootstrap
: Run theclean:deps
,gitclone
andcopy
tasks.- 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
regen
Runindex
,articles-from-rss
,examples-list
,examples
,api-docs
andplatform-support
tasks.index
generatespublic/index.html
- Materials & Sources:
src/platforms-plugins.json
src/tpl/.index.html
src/css/style.scss
src/img/*
src/img/platforms/*
- Materials & Sources:
articles-from-rss
generates article lists from a given set of rss feed targets.- Materials & Sources:
tpl/.articles.html
tpl/rss-list.html
- Materials & Sources:
examples-list
generatespublic/examples.html
- Materials & Sources:
tpl/.examples.html
src/johnny-five/README.md
- Materials & Sources:
examples
generatespublic/examples/*.html
- Materials & Sources:
tpl/.example-content.html
src/johnny-five/README.md
src/johnny-five/tpl/programs.json
src/johnny-five/tpl/titles.json
src/johnny-five/docs/breadboard/*.png
- Materials & Sources:
api-docs
generatespublic/api.html
andpublic/api/*.html
- Materials & Sources:
tpl/.api.html
tpl/.api-content.html
src/johnny-five.wiki/Home.md
src/johnny-five.wiki/[API PAGES].md
src/johnny-five/docs/breadboard/*.png
- Materials & Sources:
platform-support
generatespublic/platform-support.html
- Materials & Sources:
tpl/.platform-support.html
tpl/.platform-variant.html
src/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=production
orenv=staging
to 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.