Skip to content

Commit

Permalink
fix(contributing.md and setup.md): added contributing.md and setup.md…
Browse files Browse the repository at this point in the history
… file
  • Loading branch information
opensrc0 committed Mar 18, 2024
1 parent 60faccf commit 58d7ffd
Show file tree
Hide file tree
Showing 4 changed files with 144 additions and 5 deletions.
89 changes: 89 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
Thanks for showing interest to contribute to FE-Pilot...!

## Setup the Project
[Setup fe-pilot locally on your machine and use in the your project](SETUP.md)

## Development

To improve our development process, we've set up tooling and systems. FE-Pilot
uses a monorepo structure and we treat each component as an independent package
that can be consumed in isolation.

### Tooling

- [PNPM](https://pnpm.io/) to manage packages and dependencies

### Commands

**`pnpm install`**: bootstraps the entire project, symlinks all dependencies for
cross-component development and builds all components.


## Think you found a bug?

Please conform to the issue template and provide a clear path to reproduction
with a code example. The best way to show a bug is by sending a CodeSandbox
link.

You may wish to use our starters to help you get going:

- JavaScript Starter: https://codesandbox.io/s/fe-pilotJS
- TypeScript Starter: https://codesandbox.io/s/fe-pilotTs

## Proposing new or changed API?

Please provide thoughtful comments and some sample API code. Proposals that
don't line up with our roadmap or don't have a thoughtful explanation will be
closed.

## Making a Pull Request?

Pull requests need only the :+1: of two or more collaborators to be merged; when
the PR author is a collaborator, that counts as one.

### Commit Convention

Before you create a Pull Request, please check whether your commits comply with
the commit conventions used in this repository.

When you create a commit we kindly ask you to follow the convention
`category(scope or module): message` in your commit message while using one of
the following categories:

- `feat / feature`: all changes that introduce completely new code or new
features
- `fix`: changes that fix a bug (ideally you will additionally reference an
issue if present)
- `refactor`: any code related change that is not a fix nor a feature
- `docs`: changing existing or creating new documentation (i.e. README, docs for
usage of a lib or cli usage)
- `build`: all changes regarding the build of the software, changes to
dependencies or the addition of new dependencies
- `test`: all changes regarding tests (adding new tests or changing existing
ones)
- `ci`: all changes regarding the configuration of continuous integration (i.e.
github actions, ci system)
- `chore`: all changes to the repository that do not fit into any of the above
categories


### Steps to PR

Under Maintenance

### Tests

All commits that fix bugs or add features need a test.

## Want to write a blog post or tutorial

Under Maintenance

## Want to help improve the docs?

Under Maintenance

## License

By contributing your code to the fe-pilot GitHub repository, you agree to
license your contribution under the MIT license.
48 changes: 48 additions & 0 deletions .github/SETUP.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Setup
Clone the repository and run the following commands from the root directory of fe-pilot

## Local setup

#### 1. Go to the fe-pilot repo location in your terminal and do
```
npm install
npm start
```

#### 2. Open terminal and Go to any ```working react application``` in your system, where you want to ```implement FE-Theme```

```js
npm link {PATH}/fe-pilot/
```
  **Note:** PATH is the location of cloned fe-pilot folder


#### 3. Pass theme config to ThemeProvider
```js
import PhoneBook from 'fe-pilot/PhoneBook';
import Share from 'fe-pilot/Share';
import { TextToSpeechInit, TextToSpeechStart, TextToSpeechStop } from 'fe-pilot/TextToSpeech';

<PhoneBook />
<Share />
<TextToSpeechInit text="Password field is not contained in a form: (More info: ">
<TextToSpeechStart>Start Icon</TextToSpeechStart>
<TextToSpeechStop>Stop Icon</TextToSpeechStop>
</TextToSpeechInit>
```

#### 4. Hurrah...! Now fe-pilot repo is available inside the node_modules of your project, and waching change in fe-pilot.


## Folder Structure

```
fe-pilot
└── __app
└── component
├──TextToSpeech (component name)
| ├──TextToSpeech.js (top level exports/re-exports)
| ├──TextToSpeechInit.js (parent component)
| ├──TextToSpeechStart.js (child component)
| └──TextToSpeechStop.js (child component)
```
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
node-version: ${{ matrix.node-version }}

- run: npm ci
- run: npm run build
- run: npm run prod
- run: npm run semantic-release
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
Expand Down
10 changes: 6 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@
"scripts": {
"test": "echo \"Success: Verified\"",
"start": "npm run local",
"local": "babel __app/component -d __build --watch",
"build": "npm run build:component && npm run build:indexfile",
"build:component": "babel __app/component -d ./__build",
"build:indexfile": "node ./__app/script/generateIndex.js",
"local": "npm run local:indexfile && npm run local:component",
"local:indexfile": "node ./__app/script/generateIndex.js",
"local:component": "babel __app/component -d __build --watch",
"prod": "npm run prod:indexfile && npm run prod:component",
"prod:indexfile": "node ./__app/script/generateIndex.js",
"prod:component": "babel __app/component -d __build",
"commit": "npm run lint:check && git-cz",
"lint:check": "lint-staged",
"lint:fix": "eslint . --fix",
Expand Down

0 comments on commit 58d7ffd

Please sign in to comment.