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

@aheadlabs/ngx-toolset

v0.2.0

Published

Opinionated Angular library that contains common tools and patterns to simplify things and reuse code.

Downloads

16

Readme

NgxToolset

Opinionated Angular library that contains common tools and patterns to simplify things and reuse code.

This library was generated with Angular CLI version 14.1.0, so all projects that use this library must have Angular version numbers >= 14.1.0.

The package is published at https://www.npmjs.com/package/@aheadlabs/ngx-toolset

Contributing

.npmrc file

This file in projects/ngx-toolset contains configuration information for the npm package manager (more info at https://docs.npmjs.com/cli/v8/configuring-npm/npmrc).

In order to authenticate against npm you would need a valid token in an environment variable called NPM_TOKEN. That way npm CLI will find it through the .npmrc file.

Code scaffolding

To add a new component run ng generate component component-name --project ngx-toolset to generate a new component. You can also use ng generate directive|pipe|service|class|guard|interface|enum|module --project ngx-toolset.

Note: Don't forget to add --project ngx-toolset or else it will be added to the default project in your angular.json file.

package.json and version numbers

The package.json file at / is only for the workspace, NOT for the library.

Remember to update version numbers, dependencies and any other package configuration related to the library at /projects/ngx-toolset/package.json file.

Building the library

You can build the library from the root / or from the library root /projects/ngx-toolset/.

From root

Run npm run build-library to build the project and copy the .npmrc file to the /dist/ directory.

From library root

Run npm run build to build the project and copy the .npmrc file to the /dist/ directory.

Developer tips

How to install the library locally

In order to test the behaviour of the library when developing new features, you can install the library from your local workspace using:

npm install [your_test_project_location]/ngx-toolset/dist/ngx-toolset --save

How to check if your test project is using the library locally

To check if the library is being tested from your local code, you can check the package.json and see your local directory in the library package, under dependencies:

"@aheadlabs/ngx-toolset": "file:[your_test_project_location]/_ngx-toolset/dist/ngx-toolset"

Or from node_modules folder, a img.png icon over the package will point that the package is being used locally:

img.png

Note: Don't forget to inject the modules you need into the correspondant module on your project. Otherwise you will not be able to use the library.

Publishing

After building your library with ng build ngx-toolset, go to the dist folder cd dist/ngx-toolset and run npm publish.

Please, refer to the .npmrc file section earlier in this document.

Running unit tests

Run ng test ngx-toolset to execute the unit tests via Karma.

Troubleshooting

| Problem | Solution | |------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------| | When installing the library locally (for developing purposes), an error is shown in the browser's developer console: ERROR TypeError: Cannot read properties of null (reading 'bindingStartIndex') | You have to activate the preservation of symlinks. Open angular.json file and find options in build in architect and add "preserveSymlinks": true

Further help

To get more help on the Angular CLI use ng help or go check out the Angular CLI Overview and Command Reference page.