Skip to content

Commit

Permalink
docs(react-lib): update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
devmozao committed Oct 25, 2023
1 parent 091a032 commit b4b58d5
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 7 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Changelog

## [Unreleased]
## 0.0.1 - 25/10/23

First release of the package. Support to Node 20 and Vite 4.

~ t a k e m y e n e r g y ~ ༼ つ ◕_◕ ༽つ🌋
22 changes: 21 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,24 @@
# how to publish
# Eruption🌋 React Lib

Your production go-to model to easily publish a lib/components to npm and github package registry, for your React/Typescript projects.

## how to use

The project is ready to be used as a template for your own lib. You can clone it or use the Eruption🌋 CLI to create a new project (available soon).

## how to develop

The project have two separated structures: `lib` is for the lib itself where the components will be developed and will bundle to publish into github/npm, and the `src` where you should use as your usual development mode to develop the library itself. Since we use absolute paths to import the components, you can import the libs/components using `@lib/` prefix, the same way you would do with `@src/`.

## how to publish

Before you publish, don't forget to change the lib name in the `package.json` file. The name is the one that will be used to install the package in other projects. Also, don't forget to change the `package.json` version, description and author, too. Homepage, bugs and repository, should be changed as well and reflect the repository that your project lives in (aka github).

A friendly reminder that you can't publish a package with the same version twice, and you can't publish a private package to npm with a free account. In addition, to publish via github, you need to have a personal access token with the right access to publish packages. You can create one in your github account settings. Check the docs for further details.

This project takes a lot of opinions of how a lib should be structured, developed and published. If you want to change the structure, take your time to understand each config under `vite.config.ts` and `tsconfig.json` files. You should be able to follow with the official vite and rollup docs.

## how to publish to github/npm

- run

Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"name": "@devmozao/poc",
"description": "poc for lib components",
"author": "@devMozao",
"name": "react-lib",
"description": "🌋 lib/components boilerplate for projects made with React/Typescript, on top of Vite ⚡",
"author": "Eruption🌋",
"private": false,
"version": "0.0.1",
"license": "MIT",
"homepage": "https://github.com/devmozao/poc",
"bugs": "https://github.com/devmozao/poc",
"homepage": "https://github.com/eruption/react-lib",
"bugs": "https://github.com/eruption/react-lib",
"main": "dist/main.js",
"types": "dist/main.d.ts",
"repository": {
Expand Down

0 comments on commit b4b58d5

Please sign in to comment.