NPM template
This is a pre-configured template repository to help you quickly get started with developing npm/yarn packages
NPM
GitHub
Installation
the project was built and tested using the yarn package manager. so to set up the project please run the following
yarn setup
this will ask you a bunch of questions that will help you setup up your project quickly
Usage
Refer to INSTALL
Tools
this section explains the various files, tools and folders in the template.
yarn
used to run and manage the dependencies and workings of the template
typescript
used for developing consistent JS code with typescript types and rules, configured with tsconfig.json
that generate the output in ./dist
folder and then minified using minify-all-js
module.
nodemon
used to watch js/ts files and run the given command for ease of development, configured in nodemon.json
.
prettier
used for code formatting to maintain consistency across commits, configured with .prettierrc
and uses the .prettierignore
to ignore formatting files and folders.
eslint
used for maintaining code quality, configured with .eslintrc
and uses the .eslintignore
to ignore files and folders.
jest
used for code coverage and testing that is configured with ./jest.config.js
the coverage data is generated into ./coverage
folder.
jsdoc + betterdocs
jsdoc documentation
betterdocs documentation
used to generate documentation that is already written in the code using the jsdoc module cofigured with jsdoc.json
the output is generated in ./docs
folder.
snyk
used to check vunerabilities in package dependencies and code configured in .snyk
Others
http-server
used to serve the static html files in documentation
, coverage
,QA
, etc
lint-staged
used to format and check code quality of the staged files, configured in .lintstagedrc
commitizen
helps create conventional commits, configured in .czrc
commitlint
used to lint the created commit, configured with .commitlintrc
husky
used to add git hooks to let the dev check commit validity before pushing
semantic-release
used to create releases with the help of conventional commits
github-label-sync
used to create better integrated labels in the github repository, configured in .github/labels.json
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Some files to refer
Please make sure to update tests as appropriate.