-
Simon Künzel authoredSimon Künzel authored
Commands
Install nodejs with version >=18.17.0 and npm (which should come pre-packaged with nodejs)
npm install
: Installs dependencies
Running npm run dev
is the recommended way to start the development server (compiling and serving files over http, automatically refreshing components when their code is updated etc.)
NEXT_PUBLIC_API_URL_PREFIX=http://localhost:5000 npm run dev
: Starts development server
npm run build
: Compiles website into static files, output placed in out/
npm run lint
: Runs a lint on the code to check for errors and warnings
npm run prebuild
: Builds assets required for the build, such as language files
npm audit
: Checks for known vulnerable versions of dependencies
npm outdated
: Shows outdated dependencies
It is recommended to install npm run lint
as a git commit hook
Production
A full description of the production setup can be found in the videoag_infra/production
repository. The repository and/or group might not be visible to you.
tl;dr: Tag the commit that should be published.
The tag needs to start with v
, should be semver and 'newer' than the tag before it. This initiates a pipeline that triggers another pipeline in the production repo which pushes a container image to its container registry. Fluxcd notices the new container and updates the image on all kubernetes pods.
Struktur
Stand: 14.04.25
-
public/
: For static assets -
lang/
: Language files -
src/
-
data/
: ??? -
pages/
: Special directory, in which every file is rendered as .html by the framework. Filenames are kept-
_app.tsx
: Template into which every page is rendered -
_document.tsx
: Specifies base structure of the HTML
-
-
styles/
: CSS Files -
types/
: Type definitions for typescript -
videoag/
: All code which is not a page-
site/
-
DefaultLayout.tsx
: The default template into which every page is rendered
-
-
-
Coding style
Imports
- Three blocks with whitespace between them
- External imports
- Imports from other directories
- With
@/
, no relative paths- In some exceptional cases with
#src/
,#basepath
- In some exceptional cases with
- Imports from own directory
- With
./
- In each block type imports before other imports
- If possible sort by directory in each block
- No imports to files in
pages/