This project has been created using npx preact-cli create default hello-preact
, where the used template is the default one and the name of the project is hello-preact
.
Once done this, babel JSX plugin was installed. This allows us to write JSX code without importing h
from preact
.
# install dependencies
npm install
# serve with hot reload at localhost:8080
npm run dev
# build for production with minification
npm run build
# test the production build locally
npm run serve
# run tests with jest and enzyme
npm run test
For detailed explanation on how things work, checkout the CLI Readme.