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

generator-ng2-library

v1.0.1

Published

Generator for Angular2+ libraries

Downloads

4

Readme

Ng2 library generator

Generator for Angular2+ libraries

Commitizen friendly semantic-release Build Status

Table of Contents

Introduction

This generator is optimized for creating Angular >= 4.0.0 libraries.

This project has been created following the best practices and guidelines from Angular.io and the Packaging Angular talk from Jason Aden.

NPM Deployment

Login into your project's NPM registry. If you don't have an account yet, sign up here

npm login

Setup Semantic-release-cli

Semantic-release-cli provides you with a fully automated package publishing. Read more about the Semantic-release-cli here.

Install the npm package globally on your machine

npm install -g semantic-release-cli

then, navigate inside your library root folder and run:

semantic-release-cli setup

And answer the questions required for the installation process just make sure to answer No to the last one as we already have a .travis.yml configuration file.

? What is your npm registry? https://registry.npmjs.org/
? What is your npm username? your username
? What is your GitHub username? your username
? What is your GitHub two-factor authentication code? xxxxxxx
? What CI are you using? Travis CI
? Do you want a `.travis.yml` file with semantic-release setup? No
# Important to select No to avoid overwriting the already exisisting `.travis.yml` file.

Crypt your credentials

DEPRECATED

Generate a authentication token crypting your npm credentials with the following command:

echo -n 'username:password' | openssl base64

This will output a key like this: dXNlcm5hbWU6cGFzc3dvcmQ=

TravisCI configuration

DEPRECATED

Reach your TravisCI project settings and add a new environment variable called NPM_TOKEN with the token previously generated. Then create another environment variable in TravisCI called NPM_EMAIL and set it to the npm user email address linked to your previous login credentials used for generating the token.

Then the deployment script stored in the scripts/deploy.sh will be responsable for automatically deploy your library to NPM every time a new version is present in the package.json file.

Deployment lifecycle

  1. Create your new code change in your local directory
  2. Commit your changes using Commitizen with npm run commit
  3. Release a new npm version using semantic versioning with npm version patch | minor | major
  4. Push your changes
  5. Wait for Travis to publish your new version