From 58d7ffda2519acde469aab42e761b64ad091e0a2 Mon Sep 17 00:00:00 2001 From: Himanshu Gupta Date: Mon, 18 Mar 2024 18:08:11 +0530 Subject: [PATCH] fix(contributing.md and setup.md): added contributing.md and setup.md file --- .github/CONTRIBUTING.md | 89 +++++++++++++++++++++++++++++++++++ .github/SETUP.md | 48 +++++++++++++++++++ .github/workflows/publish.yml | 2 +- package.json | 10 ++-- 4 files changed, 144 insertions(+), 5 deletions(-) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index e69de29..56f6087 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -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. diff --git a/.github/SETUP.md b/.github/SETUP.md index e69de29..e58e291 100644 --- a/.github/SETUP.md +++ b/.github/SETUP.md @@ -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'; + + + + + Start Icon + Stop Icon + +``` + +#### 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) +``` diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index fc8d967..da6577d 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -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 }} diff --git a/package.json b/package.json index fc11266..3d3503b 100644 --- a/package.json +++ b/package.json @@ -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",