From 196c6453af16f94d85f04f19e528b385da9f16ec Mon Sep 17 00:00:00 2001 From: Langbein Date: Mon, 24 Feb 2020 10:27:31 +0100 Subject: [PATCH] added logos to *.md files --- CODE_OF_CONDUCT.md | 2 + CONTRIBUTING.md | 3 +- DEVELOPMENT_TODO.md | 139 -------------------------------------------- README.md | 30 ++-------- 4 files changed, 10 insertions(+), 164 deletions(-) delete mode 100644 DEVELOPMENT_TODO.md diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index 42c329fa1..ac2553187 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -1,3 +1,5 @@ +![RIESGOS Logo](src/assets/logos/riesgos_base_small_en.svg "RIESGOS Logo") + # Contributor Code of Conduct ## Version 0.1-RIESGOS diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c1a54c567..e32e391cd 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,3 +1,5 @@ +![RIESGOS Logo](src/assets/logos/riesgos_base_small_en.svg "RIESGOS Logo") + # Contributing to RIESGOS We would love for you to contribute to RIESGOS and help make it even better than it is @@ -163,4 +165,3 @@ changes to be accepted, the CLA must be signed. It's a quick process, we promise [github]: https://github.com/riesgos/ [cla]: https://github.com/riesgos/project-riesgos/DLR_Individual_Contributor_License_Agreement_RIESGOS.pdf [coc]: https://github.com/riesgos/project-riesgos/CODE_OF_CONDUCT.md -[development]: https://github.com/riesgos/project-riesgos/DEVELOPMENT.md diff --git a/DEVELOPMENT_TODO.md b/DEVELOPMENT_TODO.md deleted file mode 100644 index 4dd9d2576..000000000 --- a/DEVELOPMENT_TODO.md +++ /dev/null @@ -1,139 +0,0 @@ -# Licenses - -3rd party licenses are displayed with the component 'licenses.component'. This component requires there to be a file named 'licenses.json' in the assets directory. -This file has been autogenerated with the 'license-checker' npm-module. When new dependencies are added, the file needs to be regenerated manually. - - - - - - - - - -# Getting started - -- Check if [Git](https://git-scm.com/) is installed. -- Clone the repo: `git clone https://github.com/dlr-eoc/frontend-libraries.git` . -- Check if [Node.js](https://nodejs.org/) and npm are installed. -- Move into project: `cd frontend-libraries` -- Install dependencies: `npm install` - -## Note -- all versions in package.json should be fixed! -- reserve time in sprint or before a sprint to upgrade versions and then to test and fix broken dependencies. (similar to hardware upgrades) -- check for new versions `npm outdated -l` and `ng update` - - -# Ho to create a new Project library (UKIS-Module) - -### 1. Generate a new library with the cli -run ``ng generate library < name > --prefix ukis`` - -- rename lib package: "name": "@ukis/< name >" -- set version to: "version": "0.0.0-PLACEHOLDER" -- set lib package: "main": "src/public_api", -- add "license": "Apache-2.0" or a compatible licenses -- add path mapping to paths in the main tsconfig.json - -### 2. Add and create Files -- create components and or services in the lib with the cli -- add missing exports to public_api.ts - -### 3. Add Dependencies - -[When my package depends on another package, should I put it in dependencies or peerDependencies?](https://medium.com/angular-in-depth/npm-peer-dependencies-f843f3ac4e7f) - ---- - - -If your project depends on a package that is already listed in [frontend-libraries/package.json](https://github.com/dlr-eoc/frontend-libraries/package.json), ... - - - add that package as a peer dependency to your project-specific package.json. Use a version-placeholder (`0.0.0--PLACEHOLDER`) for those peer dependencies. Example: - ``` - // package.json - // ... - "peerDependencies": { - "@angular/common": "0.0.0-NG-PLACEHOLDER", - "@angular/core": "0.0.0-NG-PLACEHOLDER", - "@angular/cdk": "0.0.0-ngcdk-PLACEHOLDER", - "@clr/angular": "0.0.0-CLR-PLACEHOLDER", - "@clr/icons": "0.0.0-CLR-PLACEHOLDER", - "rxjs": "0.0.0-rxjs-PLACEHOLDER", - "md5": "0.0.0-md5-PLACEHOLDER", - "core-js": "0.0.0-corejs-PLACEHOLDER", - "zone.js": "0.0.0-zonejs-PLACEHOLDER" - } - // ... - ``` - This placeholder gets replaced with the versions of the main package.json on publish! - - list them in your project-specific ng-package.json as whitelistedNonPeerDependencies - - -### 4. Test your library -- create specs and run `ng test < name >` - -### 5. Build your library locally -- build lib `ng build < name >` - - -# How to publish a new version of all projects -- make sure you have updated README and CHANGELOG and commit all your stuff. -- run `git pull` to get the latest changes. -- run `node scripts/library/index.js -c` to check if all dependencies are present. (node_modules must be installed for this) -- run `node scripts/library/index.js -t` to test all projects. (node_modules must be installed for this) -- run `node scripts/library/index.js -b` to test all projects are building locally. (node_modules must be installed for this) -- update the `version` parameter in the package.json in the root-directory (*not* in a single libraries package.json!) according to [Semantic Versioning](https://semver.org/) -- create a tag with the same version e.g `git tag -a v2.1.0 -m "Version after Sprint CoastalX II"` and push it to origin `git push origin v2.1.0` -- the jenkins-job `packaging-frontend-libraries` will discover the presence of a new tag. It will then build the packages and publish them with the new version to nexus. -- if everything is ok and you have worked on a branch, then merge your changes back into the master. - -# Developing libraries and frontend side by side -Sometimes we want to work on a frontend-project and a library simultaneously. Such a situation might occur when during the work on a project an error is detected in one of the libraries that takes some work to fix. -There are two ways to include libraries in a frontend-project: - -### 1st method: cloning libraries into your project -- clone the libraries directly into the project. In detail: - - in the root-directory of your application (say `/home/<-your-username-here->/project-`) clone the libraries: `git clone http://<-your-username-here->@git.../frontend-libraries.git` - - adjust the path mapping in `project-/tsconfig.json`, so that the ts-compiler will look for any `@ukis` dependencies in the libraries-directory you just downloaded: - ``` - // tsconfig.json - ... - "paths": { - "@ukis/*": [ - "dist/*", - "frontend-libraries/projects/*" - ] - } - ... - ``` - -### 2nd method: build libraries and project side by side -- compile the library on changes and link the compiled library into the frontend-projects `node_modules/@ukis` directory. - -##### Building side by side - method 1: using ng build and npm link -- clone the libraries -- use `ng build --watch=true` -- `npm link ../frontend-libraries/dist/` in your project - -##### Building side by side - method 2: using `buildAndLink.sh` -We have provided a script for this purpose: `bash scripts/buildAndLink.sh `. -Note that this script assumes that the project- and the libraries-directories are placed side by side in the same folder. -For example, assume that the folders `frontend-libraries` and `project-mariss` are situated in the same directory. -Then executing `bash frontend-libraries/buildAndLink.sh services-owc-json project-mariss` will build the library `frontend-libraries/projects/services-owc-json` and link it into `project-mariss/node_modules/@ukis/services-owc-json`. - - - -# Usage of compodoc to generate documentation -[compodoc](https://github.com/compodoc/compodoc) is used to collect and render documentation from code for angular projects. - -### How compodoc works - -* definition of included source code in tsconfig.doc.json -* By default compodoc does not scan node_modules for source code to include into documentation. This behaviour cannot be changed without adapting compodocs code. -* A call to `npm run compodoc` will generate the documentation which is stored in folder documentation inside the project. This can be pushed to git, so that it can be browsed from there. - -### Writing documentation for compodoc - -Compodoc use Typescript AST parser and it's internal APIs, so the comments have to be JSDoc comments. - diff --git a/README.md b/README.md index 7c5465b03..f93c7e8a0 100644 --- a/README.md +++ b/README.md @@ -1,27 +1,9 @@ -# ProjectRiesgos +![RIESGOS Logo](src/assets/logos/riesgos_base_small_en.svg "RIESGOS Logo") -This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 8.0.3. +## Getting started +This project depends on the 'UKIS frontend libraries', which are distributed as packages on github. To use these packages, please follow the instructions on (the UKIS frontend libraries github page)[https://github.com/dlr-eoc/ukis-frontend-libraries]. -## Development server +## Licenses +3rd party licenses are displayed with the component 'licenses.component'. This component requires there to be a file named 'licenses.json' in the assets directory. +This file has been autogenerated with the 'license-checker' npm-module. When new dependencies are added, the file needs to be regenerated manually. -Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files. - -## Code scaffolding - -Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`. - -## Build - -Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `--prod` flag for a production build. - -## Running unit tests - -Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io). - -## Running end-to-end tests - -Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/). - -## Further help - -To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).