NOTE: This README and accompanying documentation is still a work in progress and is incomplete.
main:
develop:
Run npm install
to install all dependencies. It is also important that you install the following tools:
This project's workspace is designed to run in a Unix-like environment. Development in a Windows environment is not tested/supported.
Make sure you create a .env.local
file. The npm postinstall setup process should take care of this for you, but if you get an error then create it.
Run nx build demo
to build the project. The build artifacts will be stored in the dist/
directory. Use the --prod
flag for a production build.
Run nx affected:test
to execute the unit tests affected by a change.
Unit tests that require firebase are run through the Docker container. This lets our tests access the emulator. Since all tests are run within the container, and the container is not configured to use service ports, it can be run at the same time as the demo.
Run nx watch firebase
to execute the unit tests and watch for changes.
Run nx test firebase
to execute the unit tests.
This library has a working demo frontend and backend attached to it.
There are two development servers: the Angular context, and the Firebase emulator context.
The angular development server can run directly on your machine. Run ./serve-web.sh
to start the angular development server and start the demo in your browser.
It will talk with the firebase development server by default.
The firebase emulator is run within a docker container. This is to allow consistent configuration described in the Dockerfile.
Run ./serve-server.sh
to start the firebase development server.
demo-api
'swatch-emulators
nx target uses entr to watch for changes in the demo-api's dist directory and restart the emulators automatically. The firebase emulator suite does not support hot-reload of functions.- Firebase rules files are hot-reloaded by the emulators.
TODO
TODO: move to contributing guide
This library uses https://github.com/jscutlery/semver to maintain versions. All versions are synchronized/shared between all sub-libraries.
Commits made should follow the following conventions: