Just some boilerplate code to get you started with a JavaScript-heavy HTML5 page (e.g. an HTML5 game).
Uses gulp.
git clone --depth=1 --branch=master git://github.com/Thunraz/js-boilerplate.git my-projectcd my-projectrm -rf .git- Edit
package.json npm installnpm run dev
There are a few gulp tasks predefined:
cleancompileRuns the following hidden subtasks:compileMarkupTransforms your Pug (formerly Jade) file to HTMLcompileScriptRuns rollup on your source code. Entry point is the file src/js/main.jscompileStyleConcatenates your CSS files (I dropped support for SASS) and minimizes itminifyJSMinifies your JavaScript codezipCreate a zip archive and prints its file size. Useful for js13kGames.
watchStarts a local web server that runs on port 8080 (can be overriden using the environment variable GULP_PORT). Rebuilds when files change.