Skip to content
This repository has been archived by the owner on Jan 9, 2023. It is now read-only.

Commit

Permalink
Merge pull request #381 from kumikokashii/update-readme
Browse files Browse the repository at this point in the history
docs(readme): move monorepo contributing guide to contributing
  • Loading branch information
fox1t committed Jul 10, 2020
2 parents 844238b + 20013f0 commit 273a60e
Show file tree
Hide file tree
Showing 2 changed files with 105 additions and 90 deletions.
98 changes: 96 additions & 2 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,20 @@ HospitalRun is made up of several repositories:

Note: We use [TypeScript](https://www.typescriptlang.org/).

# Contributing Guide for All Repos
## Dev Tools
- Gitpod provides a fully featured online development environment that is integrated with Github to clone a repo, install the dependencies, and start the webserver.

[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/HospitalRun/hospitalrun-frontend)

- [Visual Studio Code](https://code.visualstudio.com/)

# HospitalRun General Contributing Guide

Repo-specific contributing guides are listed in the above table for easy access.

Also, you are encouraged to reach out to the community of contributors for questions and feedback. See you in [Slack](https://hospitalrun-slack.herokuapp.com).
Also, you are encouraged to reach out to the community of contributors for questions and feedback. See you in Slack!

[![Slack](https://img.shields.io/badge/Slack-Join%20our%20devs%20group-blueviolet?style=for-the-badge&logo=slack)](https://hospitalrun-slack.herokuapp.com)

## 1. Browse Issues

Expand Down Expand Up @@ -70,3 +79,88 @@ For more information about CLAs, please check out Alex Russell’s excellent pos

Before contributing please read the [code of conduct](https://github.com/HospitalRun/hospitalrun/blob/master/.github/CODE_OF_CONDUCT.md)

# Monorepo Contributing Guide

## Toolchain

We recommend the use of [**nvm**](https://github.com/nvm-sh/nvm#install--update-script) for the management of different versions of Node, and [**yarn**](https://yarnpkg.com/) for a fast, reliable, and secure dependency management. We suggest to install **yarn** with `npm i -g yarn`.

## Getting Started

Use these commands to start using the monorepo. The following commands require that your GitHub account has [SSH access](https://help.github.com/en/articles/connecting-to-github-with-ssh) enabled.

```
git clone git@github.com:HospitalRun/hospitalrun.git
cd hospitalrun
git submodule update --init --recursive
yarn
yarn workspaces run build
# Do some coding then commit with
npx git-cz
```

## Pull all submodules

Use these commands to update all submodules and use the last available commit.

```
git submodule update --recursive --remote
yarn upgrade // Update all dependencies automatically
yarn update // This is similar to npm-check interactive update mode. It provides an easy way to update outdated packages.
```

## How to commit a specific package?

```
yarn commit-frontend
yarn commit-server
yarn commit-components
yarn commit-cli
yarn commit-core
yarn commit-docs
```

You must follow the following rules:

1. Commit description must always start with a capital letter.
2. Always use a scope. Here are some examples:

**Generic**

```
setting
ci
deps
readme
devops
system
core
testing
cli
release
lifecycle
```

**Monorepo specific**

```
monorepo
package
release
lifecycle
workspace
```

## Updating the monorepo structure

Use these commands to add a new package after adding a submodule.

```
git submodule update --remote
git add ./packages
yarn upgrade
npx git-cz
```

97 changes: 9 additions & 88 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,17 @@ Built with React, Node, PouchDB/CouchDB and using offline first design, we're wo

# Table of Contents

- [Staging Area](#staging-area)
- [Contributing](#contributing)
- [Project Structure](#project-structure)
- [Application Infrastructure](#application-infrastructure)
- [Monorepo-specific Contributing Guide](#monorepo-specific-contributing-guide)
- [Behind HospitalRun](#behind-hospitalRun)
- [License](#license)

# Staging Area

You can follow developments by visiting the dedicated [staging environment](https://staging.hospitalrun.io). Use `username` / `password` as credentials to access.

# Contributing

Interested in contributing to HospitalRun? There are many ways that you can get involved:
Expand Down Expand Up @@ -58,93 +62,6 @@ A visual representation of the functionality of all HospitalRun modules and thei

[<img width="1658" alt="miro" src="https://user-images.githubusercontent.com/6388707/78055877-7b50ed80-7384-11ea-9e65-602a0f8b9ec9.png">](https://miro.com/app/board/o9J_kv4RtwE=/)

<hr />

# Monorepo-specific Contributing Guide

## Toolchain

We recommend the use of [**nvm**](https://github.com/nvm-sh/nvm#install--update-script) for the management of different versions of Node, and [**yarn**](https://yarnpkg.com/) for a fast, reliable, and secure dependency management. We suggest to install **yarn** with `npm i -g yarn`.

## Getting Started

Use these commands to start using the monorepo. The following commands require that your GitHub account has [SSH access](https://help.github.com/en/articles/connecting-to-github-with-ssh) enabled.

```
git clone git@github.com:HospitalRun/hospitalrun.git
cd hospitalrun
git submodule update --init --recursive
yarn
yarn workspaces run build
# Do some coding then commit with
npx git-cz
```

## Pull all submodules

Use these commands to update all submodules and use the last available commit.

```
git submodule update --recursive --remote
yarn upgrade // Update all dependencies automatically
yarn update // This is similar to npm-check interactive update mode. It provides an easy way to update outdated packages.
```

## How to commit a specific package?

```
yarn commit-frontend
yarn commit-server
yarn commit-components
yarn commit-cli
yarn commit-core
yarn commit-docs
```

You must follow the following rules:

1. Commit description must always start with a capital letter.
2. Always use a scope. Here are some examples:

**Generic**

```
setting
ci
deps
readme
devops
system
core
testing
cli
release
lifecycle
```

**Monorepo specific**

```
monorepo
package
release
lifecycle
workspace
```

## Updating the monorepo structure

Use these commands to add a new package after adding a submodule.

```
git submodule update --remote
git add ./packages
yarn upgrade
npx git-cz
```

# Behind HospitalRun

## Hosted by
Expand All @@ -159,6 +76,10 @@ npx git-cz

[![Backers](https://opencollective.com/hospitalrun/backers.svg?width=890)](https://opencollective.com/hospitalrun/contribute/backers-335/checkout)

## Big Thanks

Cross-browser Testing Platform and Open Source <3 Provided by [Sauce Labs](https://saucelabs.com)

## Lead Maintainer

[<img src="https://avatars2.githubusercontent.com/u/1620916?s=460&v=4" width="100px;"/><br /><sub><b>Maksim Sinik</b></sub>](https://github.com/fox1t)<br />
Expand Down

0 comments on commit 273a60e

Please sign in to comment.