We are about to switch to a new forum software. Until then we have removed the registration on this forum.
I found writing p5js code very fun and easy so I created project template to make it even easier. I was tired of adding script tags for each new js file I add to my project. I also wanted to write ES6 code, and I wanted to use p5 in instance mode.
So I created a project template. I added RequireJs support to it, so I don't have to add script tag to my index.html, and I also added Babel transpiler to translate ES6 to ES5 compatible code so that it runs across all major browsers. Project template utilizes gulp tasks to perform project build (transpilation and copying of resources to dist folder).
So now, with this template I can just clone the template repository, run npm install
, add my code to src/app
directory, run gulp
and have my code ready. Just open dist/index.html
in browser after build has finished and that is :)
There is also an example project in examples
directory written using this template :)
P5js project template is on Github: https://github.com/ognjenvucko/p5js-es6-project-template
Cheers!