https://github.com/mooyoul/node-publishable
Checks if a package is publishable to NPM registry
https://github.com/mooyoul/node-publishable
cd ci node nodejs npm publish
Last synced: about 1 month ago
JSON representation
Checks if a package is publishable to NPM registry
- Host: GitHub
- URL: https://github.com/mooyoul/node-publishable
- Owner: mooyoul
- License: mit
- Created: 2018-08-31T15:04:31.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-08-31T19:50:16.000Z (over 6 years ago)
- Last Synced: 2025-03-29T06:53:27.487Z (about 1 month ago)
- Topics: cd, ci, node, nodejs, npm, publish
- Language: TypeScript
- Size: 109 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# node-publishable
[](https://travis-ci.org/mooyoul/node-publishable)
[](https://coveralls.io/github/mooyoul/node-publishable?branch=master)
[](https://codecov.io/github/mooyoul/node-publishable?branch=master)
[](https://david-dm.org/mooyoul/node-publishable)
[](https://david-dm.org/mooyoul/node-publishable#info=devDependencies)
[](https://snyk.io/test/github/mooyoul/node-publishable)
[](http://mooyoul.mit-license.org/)Checks if a package is publishable to NPM registry (with private package support!)
## Sponsor
- [Vingle](https://www.vingle.net) - Vingle, Very Community. Love the things that you love. - [We're hiring!](https://careers.vingle.net/#/engineering/backend)
## Install
```bash
$ npm install publishable
```
## Usage```typescript
import publishable = require("publishable");await publishable("package-name", "version"); // returns `boolean`
```# Related
- [mooyoul/node-publishable-cli](https://github.com/mooyoul/node-publishable-cli) - CLI for this module, made for CI/CD workflow
## Changelog
#### 1.0.1
- Add missing changelog
#### 1.0.0
- Stable release
#### 0.2.1
- Add E404 error code handling
#### 0.2.0
- Add `.npmrc` support
- Add scoped package support
- Add private package support#### 0.1.0
- Initial commit
## Debugging
Set `DEBUG` environment variable to `publishable`.
You will be able to see debug messages on your console.> $ env DEBUG='publishable' node your-app.js
## Testing
```bash
$ npm run test
```... OR
```bash
$ npm run lint # Check lint
$ npm run coverage # Run test & generate code coverage report
```## Build
```bash
$ npm run build
```## License
[MIT](LICENSE)See full license on [mooyoul.mit-license.org](http://mooyoul.mit-license.org/)