- TypeScript 84.7%
- HTML 12%
- JavaScript 2.4%
- Shell 0.4%
- CSS 0.3%
- Other 0.2%
| .forgejo/workflows | ||
| .vscode | ||
| cypress | ||
| hooks | ||
| public | ||
| src | ||
| test | ||
| .editorconfig | ||
| .gitignore | ||
| angular.json | ||
| cypress.config.ts | ||
| eslint.config.mjs | ||
| jest.config.ts | ||
| LICENSE | ||
| package-lock.json | ||
| package.json | ||
| README.md | ||
| server.ts | ||
| setup-jest.ts | ||
| tsconfig.app.json | ||
| tsconfig.json | ||
| tsconfig.spec.json | ||
TimeTrack Frontend Angular
Table of Contents
- Prerequisites
- Installation
- Running the App
- Building the Application
- Configuration Options
- Testing the Application
- Linting the Application
Prerequisites
Before you begin, ensure you have the following installed:
- Node.js (version 14 or later)
- Angular CLI (install globally using
npm install -g @angular/cli) - Git
Installation
-
Clone the repository:
git clone https://codeberg.org/timedin/timetrack-frontend.git cd timetrack-frontend -
Install the dependencies:
npm install
Running the App
To run the app in development (watch) mode, use the command:
npm start
Building the Application
You can build the application for different environments using the following commands:
-
Production Build:
npm run build -
QA Build:
npm run build:qa -
Development Build:
npm run build:dev
To build the application and watch for changes, use:
npm run watch
Configuration Options
The application supports multiple environments, each with its own configuration. The configurations are defined in the angular.json file under the configurations section of the build and serve targets.
Environment Files
- Development:
src/environments/environment.dev.ts - QA:
src/environments/environment.qa.ts - Production:
src/environments/environment.prod.ts
Configuration Details
-
Production:
- Optimizations are enabled.
- Source maps are disabled.
- File replacements for production environment.
-
QA:
- Source maps are enabled.
- File replacements for QA environment.
-
Development:
- Optimizations are disabled.
- Source maps are enabled.
- File replacements for development environment.
Testing the Application
To run the tests, use the following command:
npm test
To run tests in watch mode, use:
npm run test:watch
To generate a coverage report, use:
npm run test:cov
For end-to-end testing, use:
npm run test:e2e
Linting the Application
To lint (and auto-fix) the application, use the following command:
npm run lint