Skip to content

Commit

Permalink
fix: readme.md added Customization
Browse files Browse the repository at this point in the history
  • Loading branch information
opensrc0 committed Feb 18, 2024
2 parents fe6a249 + e96550d commit 56d0bf0
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 20 deletions.
29 changes: 12 additions & 17 deletions .github/SETUP.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,31 +6,29 @@ Clone the repository and run the following commands from the root directory
#### 1. Go to the fe-theme 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-theme/ {PATH}/fe-theme/node_modules/styled-components/ {PATH}/fe-theme/node_modules/react {PATH}/fe-theme/node_modules/react-dom
```
**Note:** PATH is the location of cloned fe-theme folder
  **Note:** PATH is the location of cloned fe-theme folder

#### 3. Last step to get config folder(fe-theme) contains config files of each component in your project repo

Create config file for all the component of fe-theme
    Create config file for all the component of fe-theme
```js
COMPONENT_CONFIG_PATH=./{location of fe-theme configuration folder in your application} ENVI=local CURRENT_APP_DIR=$(pwd) npm run theme-prepare --prefix ./node_modules/fe-theme
COMPONENT_CONFIG_PATH=./{Location} ENVI=local CURRENT_APP_DIR=$(pwd) npm run theme-prepare --prefix ./node_modules/fe-theme
```

Create config file for a single component of fe-theme
    Create config file for a single component of fe-theme
```js
COMPONENET_NAME=button COMPONENT_CONFIG_PATH=./{location of fe-theme configuration folder in your application} ENVI=local CURRENT_APP_DIR=$(pwd) npm run theme-prepare --prefix ./node_modules/fe-theme
COMPONENET_NAME=button COMPONENT_CONFIG_PATH=./{Location} ENVI=local CURRENT_APP_DIR=$(pwd) npm run theme-prepare --prefix ./node_modules/fe-theme
```
**Note:**
```COMPONENT_CONFIG_PATH``` is a variable and setup it properly.
```COMPONENT_CONFIG_PATH``` is the ***Location*** of ***fe-theme-config*** folder in your application.
```COMPONENET_NAME``` is the component Name

#### 4. Pass theme config to ThemeProvider
Expand All @@ -52,8 +50,6 @@ ReactDOM.createRoot(document.getElementById('root')).render(
#### 5. Hurrah...! Now fe-theme repo is available inside the node_modules of your project, and waching change in fe-theme.


<!-- # open http://localhost:6006 -->

## Folder Structure

```
Expand All @@ -68,11 +64,10 @@ fe-theme
├──configButton.js (Config File of Button)
├──configChip.js (Config File of Chip)
├──configInput.js (Config File of Input)
├── universal (Universal Component Folder)
| ├──configColor.js (Config File for Application Color)
| ├──configFontFamily.js (Config File for Application FontFamily)
| ├──configFontSize.js (Config File for Application FontSize)
| ├──configFontWeight.js (Config File for Application FontWeight)
| └──configPXL.js (Config File contain PXL function for Spacing in the application)
├──configColor.js (Config File for Application Color)
├──configFontFamily.js (Config File for Application FontFamily)
├──configFontSize.js (Config File for Application FontSize)
├──configFontWeight.js (Config File for Application FontWeight)
└──configPXL.js (Config File contain PXL function for Spacing in the application)
```
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,13 +99,13 @@ import Button from 'fe-theme/Button';

#### 1. Create your own theme

==> You can generate config files for all the component automatically using command line [Check Commands](./.github/COMMAND.md).
==> To Generate config files for components **Automatically** using command line [Check Commands](./.github/COMMAND.md).

==> You can also generate it Manually, follow steps given below.
==> To create config files for components **Manually**, follow steps given below.

&nbsp;&nbsp; **a)** Create an empty folder called ```fe-theme-config``` in your application at any location.

&nbsp;&nbsp; **c)** Create configButton.js file inside fe-theme-config folder (To configure Button Component)
&nbsp;&nbsp; **c)** Create ```configButton.js``` file inside ```fe-theme-config folder``` (To configure Button Component)

```js
const Button = {
Expand Down

0 comments on commit 56d0bf0

Please sign in to comment.