Install dependencies
yarn installRun development server
yarn devRun tests
yarn testRun ESlint
yarn lintA light update within semver range (low risk to break)
yarn upgradeto manage which version and changes to adopt
yarn upgrade-interactiveRun in development
yarn dev:bundleanalyzerRun on the production optimized build
yarn build:bundleanalyzerCreate a dist directory containing the static files of the user interface.
yarn buildOptionally, when deploying on the cloud you may specify the URL of the back-end
yarn build --env API_URL=https://ec2-18-222-250-141.us-east-2.compute.amazonaws.comDepending on your needs, you might want to do more optimization to the production build.
Can be simply created via
yarn packdocker build . -f Dockerfile -t user-management-frontend:1.0.0-dev.1 # Docker does not support SemVer build informationAs an alternative, the previous two steps (package and build image), can be executed with the multistage builder
docker build . -f Dockerfile.multistage \
--build-arg api_url=https://ec2-18-222-250-141.us-east-2.compute.amazonaws.com \
-t user-management-frontend:1.0.0-dev.1 docker run --rm -d -p 80:80 user-management-frontend:1.0.0-dev.1