Javascript magic for Generic Hipster Coffee
Install latest node.js
This command also automatically installs sample Generic Hipster Coffee page.
npm installThis package works only with webpages that have twig templates in src/templates/ directory.
To use your own copy of Generic Hipster Coffee, change the path in package.json on line 6 to your own (either github.com repo in user/repo form or full repo URL). If your webpage has a different name defined in package.json, you also need to change it on lines 6, 15, and 18. Then, run npm install again.
In src folder, you can create a .js file with the same name for each .twig file in the src/templates/ directory of Generic Hipster Coffee. The code from the .js file is then automatically injected to the end of the .twig file, into a <script> tag.
To run Generic Hipster Coffee page and start automatic compilation and browser refreshing:
npm startAnd see the result on the URL shown in console, (by default http://localhost:8123/).