https://github.com/rockchalkwushock/how-to-open-source
A repository for learning how to publish NPM packages as well as contribute to open source projects.
https://github.com/rockchalkwushock/how-to-open-source
commitizen npm-package nps open-source rollup yarn-packages
Last synced: 8 months ago
JSON representation
A repository for learning how to publish NPM packages as well as contribute to open source projects.
- Host: GitHub
- URL: https://github.com/rockchalkwushock/how-to-open-source
- Owner: rockchalkwushock
- License: mit
- Created: 2017-03-10T03:55:12.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2020-02-02T14:54:32.000Z (over 5 years ago)
- Last Synced: 2025-01-31T07:12:03.213Z (8 months ago)
- Topics: commitizen, npm-package, nps, open-source, rollup, yarn-packages
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/how-to-open-source
- Size: 2.52 MB
- Stars: 8
- Watchers: 2
- Forks: 1
- Open Issues: 22
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# :tada: how-to-open-source :tada:
[](https://www.npmjs.com/package/how-to-open-source)
[](https://www.npmjs.com/package/how-to-open-source)
[](https://www.npmjs.com/package/how-to-open-source)[](https://circleci.com/gh/rockchalkwushock/how-to-open-source)
[](https://codecov.io/gh/rockchalkwushock/how-to-open-source)
[](https://greenkeeper.io/)[](http://commitizen.github.io/cz-cli/)
[](https://github.com/rockchalkwushock/how-to-open-source/pulls)
[](https://github.com/semantic-release/semantic-release)
[](https://github.com/prettier/prettier)
[](https://github.com/rollup/rollup)
[](https://github.com/kentcdodds/nps)
[](https://github.com/EQuimper/eslint-config-equimper)## Purpose
This module is meant as a learning/training tool for those interested in publishing their own open source project to the NPM Registry. It is also here for those wishing to learn how to contribute to open source projects. It is purely a learning and training tool at this point and holds no real purpose as a dependency to any production based application.
## :notebook: Documentation :notebook:
> Documentation is still present in the [wiki](https://github.com/rockchalkwushock/how-to-open-source/wiki), but is under construction :100:
## Installation
There are currently no dependencies needed to run this package, although that can change with additional features so stay tuned!
```bash
$ npm install --save how-to-open-source
## or
$ yarn add how-to-open-source
```## Usage
* _CommonJS_
```javascript
const rcjh = require('how-to-open-source').rcjh;const result = rcjh();
console.log(result); // 'ROCK CHALK JAYHAWK, KU!'
```* _ES6_
```javascript
import { rcjh } from 'how-to-open-source';const result = rcjh();
console.log(result); // 'ROCK CHALK JAYHAWK, KU!'
```## Development
All scripting is being managed through [`nps`](https://github.com/kentcdodds/nps). All the scripts for the repository and their descriptions can be found in the [`package-scripts.js`](https://github.com/rockchalkwushock/how-to-open-source/blob/master/package-scripts.js).
Scripts in the `package.json`:
```bash
yarn build
# Executes rollup build of all distributions in production modeyarn cm
# precommit git-hook will run first executing scripts
# in lint-staged & validating the code...
# Executes the commitizen-cliyarn start
# Executes nps command.
# used in .circleci/config.yml to pass prefix to scripts
# i.e. yarn start test --> nps testyarn test
# Executes testing via jest & .jestConfig
# generates coverage data.
```## :running: Running code locally
If you are developing a cool new feature and want to see that it really does perform the way you want; follow these instructions to package the code base and run it just like you would if it was on the npm registry!
```bash
yarn build && yarn start library
# Executes bundling in production environment.
# Executes npm pack & opens the tarball file.# In sandbox files import your feature
yarn start sandbox
# Executes cjs & es code in corresponding sandbox.js files.
```## Contributing
Please visit [CONTRIBUTING.md](https://github.com/rockchalkwushock/how-to-open-source/blob/master/CONTRIBUTING.md)
## License
[MIT](https://github.com/rockchalkwushock/how-to-open-source/blob/master/LICENSE)
## Acknowledgments
Many thanks to [@kentcdodds](https://github.com/kentcdodds) for the great tutorial and [@bebraw](https://github.com/bebraw) for sending me the link to a chapter from his book [Authoring Packages](https://survivejs.com/webpack/packages/authoring/).