In preparation for making authentication work: these are a few (opinionated) changes I found myself making while working on the frontend.
Some of these are really my personal opinion, feel free to disagree.
Changes:
Updated the commands in package.json. Running yarn test-front is now equivalent to cd frontend && yarn test. Idem for yarn start-front and cd frontend && yarn start.
Removed the config.json file in /assets, and the ConfigService that fetches it. The one thing that was configured there (the base URL for the backend API) is now in the environment.ts module.
BackendService is renamed to ApiService. I also removed the functionality to add slashes to all request URLs and to convert observables into promises.
Added some shorthand paths to tsconfig, for imports like import { ... } from @shared/...
Removed the build time and commit URL from the footer, since this application is for a non-technical audience. Just the version and link to the most recent version of the repository is clearer, in my opinion.
Removed the localisation logic. We only support one language and have no ambitions to add more.
Added underscore to dependencies, set allowSyntheticImports setting to true for easy import of the module.
In preparation for making authentication work: these are a few (opinionated) changes I found myself making while working on the frontend.
Some of these are really my personal opinion, feel free to disagree.
Changes:
package.json
. Runningyarn test-front
is now equivalent tocd frontend && yarn test
. Idem foryarn start-front
andcd frontend && yarn start
.config.json
file in/assets
, and theConfigService
that fetches it. The one thing that was configured there (the base URL for the backend API) is now in theenvironment.ts
module.BackendService
is renamed toApiService
. I also removed the functionality to add slashes to all request URLs and to convert observables into promises.import { ... } from @shared/...
allowSyntheticImports
setting totrue
for easy import of the module.bootstrap.py
.