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 🙏

© 2026 – Pkg Stats / Ryan Hefner

onguard-libraries

v0.3.4

Published

## What is this repository for?

Readme

Onguard Components Library

What is this repository for?

This repository is an Angular Library project. Components, Directives, Pipes and Services that are shared across the suite of OnGuard projects should be built here.

References

How do I get set up?

Install Project Requirements

Run the Storybook View

  1. Install expected version of node nvm use
  2. Install Dependencies make npm-install OR npm install && cd projects/onguard-components && npm install
  3. Run the Project npm run storybook

Contributing

Source Control Guidelines

When starting a task or feature, create a new feature branch off of develop. This is best accomplished with git flow or with Atlassian SourceTree

The workflow is outlined in detail in Atlassian's Docs.

Generally feature branches should include the JIRA task id followed by an underscore '_' and then a Snake Cased description. git flow feature start <TASK ID>_Description-of-task

New Angluar Files

When creating a module, component, directive, pipe, or service be sure to leverage the Angular CLI's generate command

ng generate component components/<path-to-location>/component/name
ng generate module components/<path-to-location>/module-name
ng generate directive directives/<path-to-location>/directive-name

Modules

To allow Angular's tree shaking to optimize the size of this library when imported into another project, Each Component, Pipe and Directive should have it's own Module. This file will be used to import any other dependencies of its corresponding Component/Directive. Basic Example

Storybook

Each Angular Component has its own .stories.ts file. These Files define implementations of each component. Think of these as visual test cases. In fact, it's possible to set up unit tests on these stories to check for specific behaviour. The benefit is that the story does all of the component setup for you and the test can essentially just be an assertion. Basic Example Multi-template Example

Folder Structure for Components
  • component-name
    • component-name.component.html
    • component-name.component.scss
    • component-name.component.spec.ts
    • component-name.component.ts
    • component-name.module.ts
    • component-name.stories.ts

Linking this library to an angular application

  1. Build the project

  2. navigate to the dist directory cd projects/onguard-components/dist

  3. Create a link npm link.

  4. From the project that you would like to consume this library, run npm link @creedinteractive/onguard-components

  5. Make sure that symlinks are preserved on the project consuming this library in angular.json

  6. Consume assets from the library by adding an object to your angular.json

    {
        "architect": {
            "build": {
                "options": {
                    "preserveSymlinks": true,
                    "assets": [
                         {
                             "glob": "**/*",
                             "input": "./node_modules/@creedinteractive/onguard-components/public/assets",
                             "output": "/assets"
                         }
                     ],
                 }
             }
        }
    }

Dependency Organization

The angular workspace with sub-libraries might be confusing at first. The goal is that all dependencies are maintained at the root level and each library project only specifies peer dependencies that it needs to function.

Stack Overflow Reference The project should only have one "node modules" folder at the root level. The second level should essentially just have peer dependencies

What if you need to import a style sheet from node modules. No problem, just make sure that the relative path points to the (only) node_modules folder at the workspace root.

Fixing build warnings

WARNING: No name was provided for external module 'd3' in output.globals – guessing 'd3

Fix by adding a unique name identifier explicitly to the library's package.json file in the ngPackage section

"ngPackage": {
    "$schema": "../../node_modules/ng-packagr/ng-package.schema.json",
    "dest": "./dist",
    "assets": [
      "public/assets/**/*"
    ],
    "lib": {
      "entryFile": "src/public_api.ts",
      "umdModuleIds": {
        "moment": "moment"
        "d3": "d3"
      }
    }
  },