UNPKG

cd-force

Version:

Form creation goodness.

42 lines (24 loc) 1.81 kB
# 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](https://www.npmjs.com/). When working from the command line, it is best to log in to NPM on your local machine. See: [adduser](https://docs.npmjs.com/cli/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.*