Skip to content

Commit

Permalink
docs: update readme and contribution guidelines
Browse files Browse the repository at this point in the history
  • Loading branch information
arunvishnun committed Jan 4, 2023
1 parent b2ffbc7 commit 12b849b
Showing 1 changed file with 16 additions and 18 deletions.
34 changes: 16 additions & 18 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,22 @@ There are [few guidelines](#contributing-guidelines) that we request contributor

## Getting Started

This repo uses a custom [Lerna] mono-repo setup with [fyn] as package manager to install and local linking node modules.
<!-- This repo uses a custom [Lerna] mono-repo setup with [fyn] as package manager to install and local linking node modules. -->
This repo uses [rushjs] for mono-repo management.

### Setup

This is a mono-repo and we use [fyn] to install and local linking packages when doing development. You can use `npm run`, but never use `npm install` in our repo else things will break. Below, `fun` is an alias for `npm run` that [fyn] provides.
This is a mono-repo and we use [rushjs] to install and local linking packages when doing development. We use rushjs with pnpm. Read more [here]

Install some CLI tools globally for convenience:

```bash
$ npm install -g xclap-cli @xarc/run-cli fyn
```

Fork and clone the repo at <https://github.com/electrode-io/electrode.git> and bootstrap all the packages.

```bash
$ git clone https://github.com/<your-github-id>/electrode.git
$ cd electrode
$ fyn # install node_modules
$ fun bootstrap # run npm script bootstrap
$ npm install -g @microsoft/rush # install rush
$ rush install # installs package dependencies for all packages, based on the shrinkwrap file (pnpm-lock) that got created/updated using rush update.
$ rush build # Run build command on all projects whose source files have changed since the last successful build
```

### Try a sample
Expand All @@ -33,8 +30,7 @@ Now you can go to the `samples` folder and try the `create-app-demo` sample app,

```bash
$ cd samples/create-app-demo
$ fyn
$ fun dev
$ rushx dev
```

You should see some output in the console with `[DEV ADMIN]`. You can press `M` for the dev menu.
Expand All @@ -43,19 +39,19 @@ And when you open the browser at `http://localhost:3000`, you should see the dem

### **Useful** Notes

- You should bootstrap the entire repo at the top dir at least once with `fun bootstrap`
- After you make changes to any module under packages, if you want to test them in one of the samples, just run [fyn] in that sample and it will ensure all changed local packages are properly rebuilt and installed.
- You should bootstrap the entire repo at the top dir at least once with `rush install`
- After you make changes to any module under packages, if you want to test them in one of the samples, just run `` rushx <command>`` in that sample and it will ensure all changed local packages are properly rebuilt and installed.

#### Test with `@xarc/create-app`

You can quickly use the `xarc-create-app` package to create an app for testing.

```bash
$ cd samples
$ node ../packages/xarc-create-app/src my-test-app
$ cd my-test-app
$ fyn
$ fun dev
$ cd samples && node ../packages/xarc-create-app/src my-test-app
$ cd ../ && rush update
$ cd samples/my-test-app
$
$ rushx dev
```

## Contributing Guidelines
Expand Down Expand Up @@ -130,3 +126,5 @@ To release, follow these steps:
[xclap-cli]: https://www.npmjs.com/package/xclap-cli
[fyn]: https://www.npmjs.com/package/fyn
[docusaurus]: https://docusaurus.io/
[rushjs]: https://rushjs.io/pages/intro/welcome/
[here]: https://rushjs.io/pages/maintainer/package_managers/

0 comments on commit 12b849b

Please sign in to comment.