┬╴website
├─╴api # Serverless Azure Functions.
├─╴dist # Build output files for distribution. (git ignored)
├┬╴src # Source code requiring compilation.
│└─╴app # Application source code.
└─╴static # Static files to be copied to the (dist) output folder.
- Node.js
npm install
- mkcert – https://mkcert.dev
mkcert -install localhost
– Generates a certificate for localhost for use with the development server
- Environment variables (.env files supported)
PREACT_APP_AWS_COGNITO_REGION
(e.g. 'us-west-2')PREACT_APP_AWS_USER_POOLS_ID
(e.g. 'us-west-2_212378SHs')PREACT_APP_AWS_USER_POOLS_WEB_CLIENT_ID
(e.g. 'asdhj21837hasd12uioqjwd')PREACT_APP_AWS_USER_POOLS_OAUTH_DOMAIN
(e.g. 'myuserpool.auth.us-west-2.amazoncognito.com')
npm install
– Installs dependenciesnpm run dev
– Run a development, HMR servernpm run build
– Production-ready buildnpm run build -- --brotli
– Production-ready build with Brotli compressed filesnpm run serve
– Run a production-like servernpm run lint
– Pass TypeScript files using TSLintnpm run test
– Run Jest and Enzyme withenzyme-adapter-preact-pure
for your testsnpm run clean
– Deletes.cache
anddist
folders
For detailed explanation on how things work, checkout the CLI Readme.