You need nodejs with npm (LTS recommended)
# install dependencies
npm install
# serve with hot reload at localhost:8080
npm run dev
# build for production and launch server
npm run build
npm run start
# clean 'app' folder
npm run clean- CLIENT
- classes (java-like js structure)
- Main.js entry point of js
- Preloader.js
- ...
- icons (svg src icons)
- components (pug components)
- layouts (pug layouts)
- styles (sass styles)
- animations
- components (styles of pug components)
- functions (sass functions)
- mixins (sass mixins)
- pages (style of pug views)
- plugins (external plugins)
- variables (sass variables)
- variables (pug variables)
- views (pug pages)
- index.pug (index page)
- ...folders
- index.pug
- ...pages
- ...pages
- classes (java-like js structure)
- Main.js has 4 main methods:
- loaded - document ready
- scrolled - window on scroll
- resized - window on resize
- beforeLoaded - window on load
- In dev server renders views with saving folder structure
- pug variables files must have an object with the same name as the file
- sass variables files must have the same name as the beginning of each variable
After saving pug files hmr injecting changes but doesn't reload the page. Need manually reloading.