---iop-npm-repo-name--- v1.0.0
⚠ IMPORTANT❗❗
👀 READ BEFORE STARTING TO WORK WITH THIS TEMPLATE
About this Template
Use this template to quickly create an NPM package.
Please review and complete the following checklist to get started:
Find all occurrences of
---iop-npm-repo-name---
in the project created from this template and replace it with the new package name, make sure the new package name follows the package name guidelines.Make sure the
package.json
file is correctly configured. Check that fields likename
,description
,keywords
,repository
,bugs
, and others, go according to what the project needs.Make sure you use the latest version of the dependencies. You can run the following npm command
npm outdate
.In the file
jest.config.json
there's an example of how to set the coverage paths that will be ignored (line # 5). Configure your custom paths or delete that line of code.Make sure that the files
.gitignore
,.eslintignore
and.eslintrc.js
meet the needs of the project.There are some code examples in folders
./lib
and./tests
to begin with, check this folder structure to name files/folders, among others, and create the new folders and files accordingly, and finally DELETE unused files/folders.Update this
README
file with the real information about this new package. Be sure to DELETE this section.
Helpful Links
- How to ignore files from the npm package
- The .npmignore file
- Keeping files out of the package
- Semantic versioning 2.0.0
- About semantic versioning
- Package entry points
- Package exports
- Github license selector
---------------- DELETE THE PREVIOUS LINES ----------------
---iop-npm-repo-name---
Table of Contents
Overview (or Why)
Let people know what the new project can do specifically, provide context and add a link to any reference the visitors might be unfamiliar with. A list of Features or a Background subsection can also be added here.
Other highlights could be:
- Why you used the technologies you used
- Some of the challenges you faced and features you hope to implement in the future
Quick Start
Install
Using npm:
npm install @scope-name/my-package-name
Usage
Use examples liberally, and show the expected output if you can. It's helpful to have inline the smallest example of usage that you can demonstrate, while providing links to more sophisticated examples included in this README file or other sources.
// This is an example of how to use the operations package (sum and multiply).
const { sum, multiply } = require('@scope-name/operations');
const sumResult = sum(10, 20, 5, 15);
console.log('sumResult: ', sumResult);
const multiplyResult = multiply(10, 20, 5, 15);
console.log('multiplyResult: ', multiplyResult);
// output:
// sumResult: 50
// multiplyResult: 15000
Typically, these types of packages are scoped packages and are private by default.
If this is the case, this is an example of the .npmrc
file,
which should be at the root of the project where this package will be used.
//registry.npmjs.org/:_authToken=PUT-THE-AUTHENTICATION-TOKEN-HERE
Note: The authentication token should be requested from the infrastructure team.
How To Run Locally
Prerequisites
- NodeJs 14
- << Include extras >>
Installation
Install dependencies
npm i
Run Locally
Provide instructions and examples so users/devs can run this repo locally.
// Use examples liberally
Run Unit Test and Code Coverage
Run
npm test
To run code coverage use
npm run coverage
Package Dependencies
In this section, include the packages used as dependencies to build this package.
Some examples can be:
Contributors
2 years ago