Skip to content

Commit

Permalink
Readme update
Browse files Browse the repository at this point in the history
  • Loading branch information
dcooney committed Aug 28, 2023
1 parent cd52050 commit 867b519
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ npm run start
yarn run start
```

### Package Naming
## Package Naming

The first thing you need to do is to choose a name for the package. Your package needs to have a unique name and you should choose a name that has not been used already.

Expand All @@ -41,23 +41,23 @@ Go to the [NPM registry](https://www.npmjs.com/) and run a search. Be sure there
1. Select a different name for the component.
2. Publish as a [Scoped Package](https://docs.npmjs.com/creating-and-publishing-scoped-public-packages).

### Create Package
## Create Package

After the project setup is complete and you've selected your package name, it's time to start developing the package.

#### Example Component
### Example Component

Locate the `Example.tsx` component found in `src/lib` directory of the project. This is the component we are intending to distribute on npm which so happens to be a simple HTML button component.

You can go ahead and either rename or create a new component. Either way, this will be the main component for distribution so go ahead an add your logic here.

#### Testing Component Functionality
### Testing Component Functionality

Locate the `App.tsx` component found in `src` directory of the project. This is the file used for testing the functionality of our distributed component.

You will notice that in `App.tsx` we are importing the `Example` component and passing various props to the component. You this as an examplar for your testing.

#### Package.json
### Package.json

The next step is to update the project config found in `package.json` to reference your specific project.

Expand All @@ -75,7 +75,7 @@ It's recommended that you change the following fields:
| `repository` | The GIT repository where the code lives. |
| `bugs` | URL to the project's issue tracker. |

#### Publish Package to NPM
### Publish Package to NPM

Publishing your public or private package is as easy as running the `npm publish` command, however, before you can do so you'll need to sign up for an npm account.

Expand Down

0 comments on commit 867b519

Please sign in to comment.