npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@beemoos/oauth

v0.0.12

Published

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 re

Downloads

40

Readme

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.