@beemoos/oauth
TypeScript icon, indicating that this package has built-in type declarations

0.0.12 • Public • Published

Test your system

There are two ways to test your npm package:

Jasmine

Run ng test and utilise the karma-test-framework. If you use Unit-Test while developing, it is very likly that your package will work in production.

Create a empty project

Especially before releasing you should test your package locally. For that you run npm packagr inside the projects root folder and after that there is a dist folder that should contain a *.tgz file. This is your release client if you will. Navigate to a new folder outside this projects root folder and create a new empty Angular-Projekt wiht ng new. If you use specific angular versions you want this package to work for, insert them into the package.json file, remove the node_modules folder and then run npm i. After that, use npm install <relative path to your *.tgz-file> --save to install your previously packed package.

If everything worked out you can basically use your package now as every other package. Run ng serve and navigate to http://localhost:4200/ for a quick development, but also use ng serve --prod to check if AoT-Compilation works with your module. The app will automatically reload if you change any of the source files either ways. (Keep an eye on consoles in Terminal AND Browser. Sometimes errors start occuring while running since the package is not parsed on build)

Code scaffolding

Run ng generate component component-name to generate a new component. You can also use ng generate directive|pipe|service|class|module. Keep in mind that in order for you new directive|pipe|service|class|module to work you have to insert it into the index.ts-"chain", because everything that can not be found via these index-files will not be in your final package.

Build

Run ng packagr to build the project. The build artifacts will be stored in the dist/ directory.

Release

Before building you open the package.json file and edit the version number. The convention is not set yet.

After that you build the project and navigate to your dist/ folder. Inside of that you run npm publish. Check if everything worked by looking at the private repository browser on the Nexus

Running unit tests

Run ng test to execute the unit tests via Karma.

Readme

Keywords

none

Package Sidebar

Install

npm i @beemoos/oauth

Weekly Downloads

4

Version

0.0.12

License

MIT

Unpacked Size

1.93 MB

Total Files

129

Last publish

Collaborators

  • gereon99
  • mwernerd47
  • rroettger
  • sluzar
  • sweiss