cd-force
TypeScript icon, indicating that this package has built-in type declarations

1.2.0 • Public • Published

HydroNET Products NPM Template walkthrough

Great job on cloning this repo!

Purpose

This template can be used to quickly generate a useful NPM package, which can then be used by other HydroLogic developers. The idea is to separate concerns and keep functionality concise and managable.

What is NPM?

NPM stands for Node Package Manager. Such as NuGet or yarn, it makes working with libraries managable.

Prerequisites

  • When making a component package for Angular, have the Angular CLI installed. Preferrably the latest official release.
  • To publish a package, you will need to have an account for npmjs.com. When working from the command line, it is best to log in to NPM on your local machine. See: adduser. This will make the process a little easier.

Things to think about

  1. Determine the use case for the package you are trying to create. Is it an Angular component package? A simple JavaScript package?
  2. Make sure while developing the package, that it is as widely implementable as possible. Use config files and test. Test a lot.

Route A: An Angular package

Steps

Create a new Angular project by running:

ng new GridAssembler

This will create an Angular project with the given name.

The folder contains lots of files. Angular works with modules. It is highly recommended to create your functionality in a separate NgModule.

To do this, navigate to the root of your Angular project with the command line and run:

ng g m Grid

g stands for generate. m stands for module. The module will be named GridModule by convention.

This will create a folder under /src named 'grid'. Inside you will find a file named 'grid.module.ts'.

Under construction.

Package Sidebar

Install

npm i cd-force

Weekly Downloads

3

Version

1.2.0

License

MIT

Unpacked Size

22.5 kB

Total Files

32

Last publish

Collaborators

  • cdslijngard