A yeoman generator for a p5 project, based off of pflannery's p5 generator
- (If you haven't already installed it, install yeoman:
npm install -g yo gulp bower
). - If you're having trouble with permissions, npm recommends the following:
npm config get prefix
(Important: It should show/usr/local
if not, follow option two here)sudo chown -R $(whoami) $(npm config get prefix)/{lib/node_modules,bin,share}
- Assuming you have a directory called $DIRECTORY_NAME:
npm install -g generator-p5js
mkdir $DIRECTORY_NAME
cd $DIRECTORY_NAME
yo p5js
gulp serve
- Open $DIRECTORY_NAME up in your favourite text editor and live your life. Every time you save, your browser window will update the new sketch.
- Feel free to run
git init
inside $DIRECTORY_NAME. We've already created a.gitignore
for you. - Also,
p5.dom.js
andp5.sound.js
are included but commented out inindex.html
. You'll need to uncomment those. - Finally, assets will be stored in and served from the
assets
folder. This is useful for sound files, images, and the like.
Licensed under the MIT License. See LICENSE in the project root for license information.