1.0.3 • Published 3 years ago
dms-s3-utilities-demo v1.0.3
Npm Library for DMS
This Npm Library is created for consumer to upload, download and archive file with dms solution efforlessly. gts is used for typescript style setting.
Publish module
Currently used personal npm account and the package is named dms-s3-utilities-demo which avoid mess up with actual package publish officially.
To publish on your own account:
- Create a npm account -> here
- Open terminal under project folder, Run
npm login
, then input username, password and email. - Modify name and version in package.json
- In terminal under project folder, Run
npm publish
Pack module locally and install
It is possible to pack the library locally.
- Run
npm pack
- A *.tgz file will be generated
To install the package locally: ( Ref )
Run npm install {**/*.tgz}
Add .env file
The .env file current is setting of lambda's endpoint and api key.
To add a .env file:
- copy and rename .env-sample to .env
- fill up endpoints and api key
Run tests
- add .env file
- Run
npm run test
Examples
Examples of consuming the npm library to perform dms function are in "example" folder.
Start the example:
- add .env file under folder "example"
- Run
npm install
- Run
npm start
Useful command
- Run test:
npm run test
- Lints and checks for formatting problems:
npm run lint
- Compile from typescript to .js and d.ts:
npm run compile
- Automatically fixes formatting and linting problems (if possible):
npm run fix
- Removes output files:
npm run clean
- Run clean > fix > test > compile
npm run all
- Install dependencies
npm install
- Pack package npm pack