Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/remarkablemark/npm-package-template
An npm package template.
https://github.com/remarkablemark/npm-package-template
npm npm-package-template package template
Last synced: 12 days ago
JSON representation
An npm package template.
- Host: GitHub
- URL: https://github.com/remarkablemark/npm-package-template
- Owner: remarkablemark
- License: mit
- Created: 2016-08-29T05:59:02.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2024-01-22T00:43:20.000Z (10 months ago)
- Last Synced: 2024-10-11T15:13:23.136Z (28 days ago)
- Topics: npm, npm-package-template, package, template
- Language: JavaScript
- Size: 41 KB
- Stars: 4
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# npm-package-template
[![NPM](https://nodei.co/npm/npm-package-template.png)](https://nodei.co/npm/npm-package-template/)
[![NPM version](https://img.shields.io/npm/v/npm-package-template.svg)](https://www.npmjs.com/package/npm-package-template)
[![Build Status](https://travis-ci.org/remarkablemark/npm-package-template.svg?branch=master)](https://travis-ci.org/remarkablemark/npm-package-template)
[![Coverage Status](https://coveralls.io/repos/github/remarkablemark/npm-package-template/badge.svg?branch=master)](https://coveralls.io/github/remarkablemark/npm-package-template?branch=master)npm package template.
## Installation
Clone repository with Git:
```sh
git clone https://github.com/remarkablemark/npm-package-template.git
cd npm-package-template
```## Usage
Rename package (use [npm-package-name-checker](https://remarkablemark.org/npm-package-name-checker/) to check for name availability):
```sh
# replace $NAME with your package name
git grep -l npm-package-template | xargs sed -i '' -e "s/npm-package-template/$NAME/g"
```Manually update the files:
- [ ] LICENSE
- [ ] README.md
- [ ] package.jsonReinitialize Git repository:
```sh
rm -rf .git
git init
```Install package dependencies:
```sh
npm install
```Make first commit:
```sh
git commit -am "feat: initial commit"
```## Testing
Run tests:
```sh
npm test
```Run tests in watch mode:
```sh
npm run test:watch
```Run tests with coverage:
```sh
npm run test:coverage
```View coverage in browser:
```sh
npm run test:coverage:report
open coverage/index.html
```Lint files:
```sh
npm run lint
```Fix lint errors:
```sh
npm run lint:fix
```## Release
Only collaborators with credentials can release and publish:
```sh
npm run release
git push --follow-tags && npm publish
```To see what files are going to be published, run the command:
```sh
npm pack --dry-run
# tar tvf $(npm pack)
```## Support
- [Patreon](https://b.remarkabl.org/patreon)
- [Ko-fi](https://b.remarkabl.org/ko-fi)
- [Liberapay](https://b.remarkabl.org/liberapay)
- [Teepsring](https://b.remarkabl.org/teespring)## License
[MIT](https://github.com/remarkablemark/npm-package-template/blob/master/LICENSE)