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

containertheunis

v1.0.0

Published

This is the angular package template project. Generated with Angular CLI v 1.6.8

Downloads

2

Readme

AngularPackageTemplate

This is the angular package template project. Generated with Angular CLI v 1.6.8

You can use this project to create custom components, services, pipes and directives.

Please follow this README for detailed instructions on how to create these custom packages.

Create a Component

Run ng generate component modules/component-name to generate a new component.

Replace component-name with the name of your component.

All component names should be kebab cased and may not include the word component.

Ex:

ng generate component modules/ac-slider-textbox

Where the ac indicates the scope. In this case ac is short for Allegiace Consulting You can also generate a component by using the shorthand ng g component modules/ac-slider-textbox where g stands for generate.

Please don't delete the default app component files as you will be using them to test your package.

Create a Module

You have generated a component it is now time to generate a module, use the following command:

ng g module modules/module-name

Replace module-name with the same name as the component, in this case it would be

ng g module modules/ac-slider-textbox

Build Component

Now build your component - this step is unique to each new component.

Add Component to Module

After your component is done it is time to add it to the correct module.

Open ac-slider-textbox.module.ts file and add the component to the import statements. You want it to represent something similar to this except it should contain you component name import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common';

import { AcSliderTextboxComponent } from './ac-slider-textbox.component';

@NgModule({ imports: [ CommonModule ], declarations: [ AcSliderTextboxComponent ], exports: [ AcSliderTextboxComponent ] }) export class AcSliderTextboxModule { }

Playground Test

You have to test your component in the app component file before you package it and run the neccessary linting and unit tests.

In your app.module.ts file import your specific module.

In this case it would look something like this:

import { BrowserModule } from '@angular/platform-browser'; import { NgModule } from '@angular/core';

import { AppComponent } from './app.component'; import { AcSliderTextboxModule } from './modules/ac-slider-textbox/ac-slider-textbox.module';

@NgModule({ declarations: [ AppComponent ], imports: [ BrowserModule, AcSliderTextboxModule ], providers: [], bootstrap: [AppComponent] }) export class AppModule { }

In your app.component.html file you would include it by it's selector, in this case it would be <ac-slider-textbox></ac-slider-textbox> you would also pass in and bind to any Input or Output variables at this stage.

Lint Your Package

Test you application and if it you are happy run the following command to lint your package. ng lint Make sure it says All files pass linting. If it does not fix the issues.

Create Unit Tests

//Run Unit tests.

Export your Package

In the public_api.ts file add your export statement In this case it would be export * from './src/app/modules/ac-slider-textbox.module'

Release version & naming

Open the package.config file. If this is the first version of your package set the version to "version": "1.0.0" If this is not the first version apply the correct versioning:

major.minor.maintenance

If you have a new release that might break previous functionality increase the major number, the same goes for minor, in the case of a minor release there may not be any breaking changes to people consuming your previous package - meaning no dependancy changes. Increase the mainenance tag for small fixes and or patches.

Also rename the name of the package to the appropriate name in this case it would be "name": "ac-slider-textbox".

Add/Update README

Replace the contents of this README file with the specific README documentation of your package.

Commit files

Please make sure you have created a feature branch in this case it would be package/ac-slider-textbox

Commit your files and push them.

Build Agents

As soon as you push the build agent will pick up your package and scaffold and build it.

When it is done it will deploy your package to nexus.

This package can then be installed using the following command npm install my-package optionally your can select the version to install npm install [email protected] and it will install that version for you.