Skip to content

Commit

Permalink
feature: update readme and include contributing guidelines
Browse files Browse the repository at this point in the history
  • Loading branch information
JessNah committed Oct 26, 2021
1 parent 9f1fb30 commit 8edd6fc
Show file tree
Hide file tree
Showing 2 changed files with 110 additions and 7 deletions.
59 changes: 59 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# Contributing Guide

## πŸš€ Getting Started

* Fork the [parseArgs repo](https://github.com/pkgjs/parseargs) using the Fork button on the rop right

* Clone your fork using SSH, GitHub CLI, or HTTPS

```bash
git clone git@github.com:<GITHUB_ID>/parseargs.git # SSH
gh repo clone <GITHUB_ID>/parseargs # GitHub CLI
git clone https://github.com/<GITHUB_ID>/parseargs.git # HTTPS
```

* Change into your local parseargs project directory created from the step above

```bash
cd parseargs
```

* Add pkgjs/parseargs as your upstream remote branch

```bash
git remote add upstream git@github.com:pkgjs/parseargs.git
```

* Create a new branch for your awesome work

```bash
git checkout -b <BRANCH_NAME>
```

* Confirm tests are passing

```bash
npm test
```

* Commit your work. See the [`Pull Request and Commit Guidelines`](#-pull-request-and-commit-guidelines) section

* Push to your branch

```bash
git push -u origin <YOUR_BRANCH>
```

* Open a pull request

----

## πŸ“ Pull Request and Commit Guidelines

* Multiple Commits would ideally be [squashed](https://docs.github.com/en/desktop/contributing-and-collaborating-using-github-desktop/managing-commits/squashing-commits) and merged into one commit wherever possible

* Do not use the merge button

* Commit messages would ideally reference the associated changed subsystem or behavior.

* Pull Requests for a new feature or bug fix must include tests. Additional tests or changes to the existing ones can made in the following file: [test/index.js](test/index.js)
58 changes: 51 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
<!-- omit in toc -->
# parseArgs

🚨 THIS REPO IS AN EARLY WIP -- DO NOT USE ... yet 🚨
>
> 🚨 THIS REPO IS AN EARLY WIP -- DO NOT USE ... yet 🚨
>
Polyfill of future proposal for `util.parseArgs()`
Polyfill of future proposal to the [nodejs/tooling](https://github.com/nodejs/tooling) repo for `util.parseArgs()`


This package was implemented using [tape](https://www.npmjs.com/package/tape) as its test harness.

### Links & Resources

Expand All @@ -11,7 +17,45 @@ Polyfill of future proposal for `util.parseArgs()`

----

## `process.mainArgs` Proposal
<!-- omit in toc -->
## Table of Contents
- [πŸš€ Getting Started](#-getting-started)
- [πŸ™Œ Contributing](#-contributing)
- [πŸ’‘ `process.mainArgs` Proposal](#-processmainargs-proposal)
- [Implementation:](#implementation)
- [πŸ’‘ `util.parseArgs(argv)` Proposal](#-utilparseargsargv-proposal)
- [πŸ“ƒ Examples w/ Output](#-examples-w-output)
- [F.A.Qs](#faqs)

----

## πŸš€ Getting Started

1. **Install dependencies.**

```bash
npm install
```

2. **Open the index.js file and start editing!**

3. **Test your code by calling parseArgs through our test file**

```bash
npm test
```

----

## πŸ™Œ Contributing

Any person who wants to contribute to the initiative is welcome! Please first read the [Contributing Guide](CONTRIBUTING.md)

Additionally, reading the [`Examples w/ Output`](#-examples-w-output) section of this document will be the best way to familiarize yourself with the target expected behavior for parseArgs() once it is fully implemented.

----

## πŸ’‘ `process.mainArgs` Proposal

> Note: This can be moved forward independently of the `util.parseArgs()` proposal/work.
Expand All @@ -21,9 +65,9 @@ Polyfill of future proposal for `util.parseArgs()`
process.mainArgs = process.argv.slice(process._exec ? 1 : 2)
```

---
----

## `util.parseArgs([argv][, options])` Proposal
## πŸ’‘ `util.parseArgs([argv][, options])` Proposal

* `argv` {string[]} (Optional) Array of argument strings; defaults
to [`process.mainArgs`](process_argv)
Expand All @@ -42,9 +86,9 @@ into an `Array`
* `values` {Object}, have properties and `String` values corresponding to parsed options passed
* `positionals` {string[]}, containing [Positionals][]

---
----

## Examples w/ Output
## πŸ“ƒ Examples w/ Output

```js
const { parseArgs } = require('util')
Expand Down

0 comments on commit 8edd6fc

Please sign in to comment.