README
FP.dolphins-sample-lib-kuba
What is the purpose of this repository?
This is skeleton of package (library) to be shared as a dependency in other frontend projects. Do not clone it manually! Instead, use One Click Deployment tool. For more information, please refer to Eureka documentation.
How to use it?
There are several scripts set up for you:
Compilation
npm run build
Compiles your package with TypeScript Compiler to JavaScript (ES5). Triggers test:perf
script afterwards.
Testing
npm run test
Runs unit tests for your project. Output will be available in the console. Part of StepStone NPM Scripts.
npm run test:watch
Runs test watcher for your project. While test watcher is on, whenever you change code of your project or of unit test of your project, corresponding tests will be automatically triggered. Part of StepStone NPM Scripts.
npm run test:coverage
Runs unit tests for your project and calculates code coverage. Report will be displayed in console and available as HTML file under /coverage/lcov-report/index.html
path. Part of StepStone NPM Scripts.
npm run test:perf
Checks if your resulting bundle meets our [https://eureka.stepstone.com/display/ARCH/Client-side+performance+standards+and+methods](performance budgets).
Note: All test
scripts will also generate test-report.json
file with test results. This file is used by Bamboo in order to display results of your unit tests in human readable way.
Static code analysis
npm run lint
Triggers static code analysis for your source code (all .ts
files in /src
directory). Checks compliance with our official code style.
npm run lint:fix
Fixes some of the issues discovered by npm run lint
script.
npm run sonar
Triggers SonarQube analysis of your project. Results will be available in our SonarQube dashboard.
Releasing new versions
npm run release
Bumps version number in multiple files, creates new tag, generates changelog. Part of StepStone NPM Scripts.
How to develop my project with it?
Refer to an example in /src
directory.