Instructions apply only for Linux/POSIX based OS. I use Ubuntu 18.04.4 LTS (bionic).
Install nvm (v0.35.2).
nvm install 12.14.1 --lts=erbium --latest-npm
nvm --version
# 0.35.2
node --version
# v12.14.1
npm --version
# 6.14.5
npx comes with latest npm versions by default.
Follow official Docker installation guide.
(cd src && npm install)
Use modernizr CLI to build a minified JS version.
(cd src && \
npx modernizr -c modernizr-config.json -d ../assets/js/modernizr.min.js)
Runs static code analysis, tests and webpack bundling of JS files and CSS / SASS styles.
(cd src && npm run lint && npm test && npm run bundle && echo 'Successful build')
# or with test coverage included
(cd src && npm run lint && npm run test:coverage && npm run bundle && echo 'Successful build')
$ cd src
$ npx jest --verbose --runTestsByPath ./main/headerLink.test.js
$ cd <project_root_dir>
# generate only
$ src/scripts/docker_jekyll.sh build
# generate and serve jekyll site
$ src/scripts/docker_jekyll.sh serve
PS> cd <project_root_dir>
# generate only
PS> .\src\scripts\docker_jekyll.ps1 "Build"
# generate and serve jekyll site
PS> .\src\scripts\docker_jekyll.ps1 "Serve"
Favicons are generated from code monkey image by free favicon generator website.
I use webpack bundle analyzer.
Import explicitly foundation modules.