Run npm ci
after first installation to install dependencies
Run these commands to get something in your public folder
npm start
will generate sitenpm run dev
will generate site, show lint errors, watch files and re-run build on change
Separate commands per task:
npx gulp
will build all the staticnpx gulp clean
will clean up your public foldernpx gulp styles
will process your scss styles with entry points atsrc/styles/pages
into css files at *public/css
npx gulp markup
will process your nunjucks templates with entry points atsrc/templates/pages
into html files inpublic
foldernpx gulp images
will convert & compress images into webp and avif, make 1x less images from your 2x images and put intopublic/img
foldernpx gulp sprite
will combine svg files fromsrc/images/sprite
folder intopublic/sprite.svg
file
You may run gulp commands with flags, like this: npx gulp --lint --min
(two minuses before each of them, separated by space)
Available flags:
--lint
will run linters for runned gulp tasks--min
will minify styles (images will be always converted and compressed)--debug
will show extra logs in the console. only for build debugging purposes--open
will open yourindex.html
in the default browser after starting the local server
Student:
Mentor:
- add nunjucks examples of components, etc
- restore file structure for images after converting
- run linter only with flag