Skip to content

Commit b4b58d5

Browse files
committedOct 25, 2023
docs(react-lib): update docs
1 parent 091a032 commit b4b58d5

File tree

3 files changed

+29
-7
lines changed

3 files changed

+29
-7
lines changed
 

‎CHANGELOG.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Changelog
22

3-
## [Unreleased]
3+
## 0.0.1 - 25/10/23
4+
5+
First release of the package. Support to Node 20 and Vite 4.
46

57
~ t a k e m y e n e r g y ~ ༼ つ ◕_◕ ༽つ🌋

‎README.md

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,24 @@
1-
# how to publish
1+
# Eruption🌋 React Lib
2+
3+
Your production go-to model to easily publish a lib/components to npm and github package registry, for your React/Typescript projects.
4+
5+
## how to use
6+
7+
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).
8+
9+
## how to develop
10+
11+
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/`.
12+
13+
## how to publish
14+
15+
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).
16+
17+
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.
18+
19+
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.
20+
21+
## how to publish to github/npm
222

323
- run
424

‎package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
{
2-
"name": "@devmozao/poc",
3-
"description": "poc for lib components",
4-
"author": "@devMozao",
2+
"name": "react-lib",
3+
"description": "🌋 lib/components boilerplate for projects made with React/Typescript, on top of Vite ⚡",
4+
"author": "Eruption🌋",
55
"private": false,
66
"version": "0.0.1",
77
"license": "MIT",
8-
"homepage": "https://github.com/devmozao/poc",
9-
"bugs": "https://github.com/devmozao/poc",
8+
"homepage": "https://github.com/eruption/react-lib",
9+
"bugs": "https://github.com/eruption/react-lib",
1010
"main": "dist/main.js",
1111
"types": "dist/main.d.ts",
1212
"repository": {

0 commit comments

Comments
 (0)