# Forms

Bootcamp private npm package that renders forms that users save (surveys, ad-hoc, etc.).  It's 
built with reusable, responsive, accessible front end components written in React.

### How to use: 

* type `npm install --save @trilogyeducation/forms` or `npm install --save @trilogyeducation/forms@x.x.x`
* import form into any page `import { Form } from "@trilogyeducation/forms"`

### Steps to deploy to production: 

* update version in package.json
(first number is for major or breaking change, second number is for a minor change and 
third number is for patch releases ie 1.2.3)
* type `npm run lint`
* type `npm run test`
* create pull request against `main` branch

### Steps to deploy test version of npm package manually: 

* clone/download Forms repo
* cd into folder
* type `npm install`
* make changes / create tests
* update version in package.json
(first number is a major or breaking change, second number is for each release, 
third number is each patch and extension is each test cycle prior to 
release "-rc.x") ie 1.2.3-rc.8
* type `npm run lint`
* type `npm run test`
* type `npm run build` (creates dist/index.js file)
* create npm user account
* get access to private npm organization trilogyeducation 
(Justin Johnson, Roy Brown or Chad Pappas)
* type `npm publish`

### Steps to deploy production version of npm package manually is the same as test except we remove "-rc.x"

### Steps to test npm package locally:

* clone/download Forms repo
* cd into folder
* type `npm install`
* type `npm run build` (creates dist/index.js file)
* clone/download client repo ie Canvas Login, Canvas LTI
* cd to folder
* type `npm install`
* type `sudo npm link <npm package path>/forms` (use unlink to remove)
* import form into any page `import { Form } from "@trilogyeducation/forms"`
* type `npm start` to locally launch client repo and view form component