NPM Scripts
This repository can be used as a starting point for any frontend theme, through modifying the npm scripts inside package.json, great flexibility is allowed. The following is supported:
- node-sass with Postcss plugins:
- Stylelint
- PX to REM - auto convert px to rems.
- Autoprefixer
- Cssnano
- Image minification
- Copy
- SVG sprite generation
- a11y for Accessibility testing
- filesize package displays asset sizes at the end of the production build
- Browsersync with all compilation triggering browser reload
- Check version script that ensures correct Node version is loaded, defined by package.json's
engines
key.
Build
docker-compose run --rm frontend npm run build
- Your built static site will be available at
./dist
Develop
docker-compose up
http://localhost
Preact inbuilt
Preact (instead of react) is included and imported as react
via preact-compat
. This should
allow you to create react modules and use react packages easily.
3rd party dependencies
The following are included for optional use in the frontend itself:
- Foundation
- jQuery
- Owl.carousel