Skip to content

Commit

Permalink
Merge pull request #104 from gthomas-appfolio/contribDocs
Browse files Browse the repository at this point in the history
Add contribution guidelines and releasing scripts
  • Loading branch information
aaronpanch authored Jan 18, 2017
2 parents d4ece49 + 79080b1 commit 13326c4
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@
coverage
node_modules
dist
*.log
27 changes: 27 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Contributing Guidelines

First, thanks for your interest in contributing to `react-gears`—your fellow engineers will greatly appreciate your work! This document outlines some guidelines about how to interact with this codebase. Changes, amendments, and clarifications to this document are always welcome (and encouraged!) Also, these guidelines are heavily borrowed from our own APM Bundle [contribution guidelines](https://github.com/appfolio/apm_bundle/blob/master/CONTRIBUTING.md) and merely add on a workflow for releasing NPM packages.

## How to make changes

Start by re-familiarizing yourself with the [contribution guidelines](https://github.com/appfolio/apm_bundle/blob/master/CONTRIBUTING.md) in our main `apm_bundle` repository. Aside from any Ruby/Rails specific items, the committing, testing, and reviewing process is the same here as it is there. Specifically for style, we are using ESLint. Lastly, since this project is small, tests can and should be run locally, but they are also run on CircleCI.

## How to publish changes

There are two steps to publish changes that are already tested, reviewed, and merged to master: 1) bumping the version, and 2) publishing.

### Bumping the Version

The `react-gears` package follows [semantic versioning](https://docs.npmjs.com/getting-started/semantic-versioning). After assessing the extent of the changes bump the version of the package:
```
npm version [ major | minor | patch ]
```
See the [documenation](https://docs.npmjs.com/cli/version) for more details. In a nutshell, this command updates the version in `package.json`, builds the static documentation, and bundles these changes in a commit and tag.

### Publishing

The next step is to actually publish the gem, i.e. push it to our NPM repository. After bumping the version simply run publish:
```
npm publish
```
This command, pushes the gem to our private repository and pushes the last commits and tags.
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,14 @@
"registry": "https://npm-proxy.fury.io/appfolio/"
},
"scripts": {
"dist": "webpack -p",
"lint": "eslint src; exit 0",
"start": "start-storybook -p 6006",
"test": "nyc --reporter text --reporter lcov mocha --recursive --timeout 10000 --compilers js:babel-register --require ignore-styles",
"docs": "build-storybook -o docs",
"version": "npm run docs && git add -A docs",
"dist": "webpack -p",
"prepublish": "npm run dist",
"build-storybook": "build-storybook -o docs"
"postpublish": "git push && git push --tags"
},
"dependencies": {
"babel-polyfill": "~6.13.0",
Expand Down

0 comments on commit 13326c4

Please sign in to comment.