-
Install node v 10 or greater (Tried NVM ?? ) - Install NPM, run
npm install -g yeoman - Run
npm install -g generator-deanhtml5 - Make a directory and in it run
yo deanhtml5 - Give the app a title, and answer any other prompts
- Begin to fiddle with the app and tests
You now have an HTML5 app, which needs no back end process to run it but:
grunt serverwill spin up a server, and open a browser tab in which it live-reloads code changes- RequireJS is set up to load config and alter the main page on DOM ready, as well as load (JS, CSS, CoffeeScript)
npm testwill run any tests that you indicate don't require a browser environmenthttp://localhost:8080/test-runner.htmlwill run all tests in the browser in mochagrunt buildorr.js -o app.build.jswill produce a compiled build of the app in thedist/directory
Other workflow benefits
- Output of generator added to a local git repo, so your changes can be clearly seen/reverted
- On file saves, SASS/SCSS files will be recompiled, JS will be linted
heroku push origin master- the site will run on heroku as a static site- Coffeescript is compiled at load time by the require js framework