Skip to content

Commit 9627834

Browse files
committed
chore(poc): update package, readme and changelog
1 parent 83dd9be commit 9627834

File tree

3 files changed

+21
-152
lines changed

3 files changed

+21
-152
lines changed

CHANGELOG.md

Lines changed: 2 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -1,62 +1,5 @@
11
# Changelog
22

3-
## v1.6.0
3+
## [Unreleased]
44

5-
. Updated dependencies to support Node v20 with NPM v10.
6-
. Upgraded to Typescript v5.
7-
. Upgraded several libs to the latest versions (no major changes).
8-
. The dependency "@vitest/coverage-c8" was moved to "@vitest/coverage-v8", but without breaking changes.
9-
. Prettier now requires that "@trivago/prettier-plugin-sort-imports" must be explicit configured as a plugin. (wasn't before)
10-
. Added a new script command called "host", to support vite host mode.
11-
. Added a new script called "format:check", to check if the code is formatted on lintstaged.
12-
. Upgraded lintstaged, there was a typo on it for css formatting.
13-
. Added a new code snippet for function components autocomplete.
14-
. Increased rules for a better approach with commintlint usage.
15-
. Increased eslint rules to ensure some good practices. (still a working in progress)
16-
17-
To the future:
18-
19-
. A better and greater eslint ruleset. We aim to have a great DX, but also a great code quality, and that means a more incisive and codebase quality control over time.
20-
. As we learn how to deal with postcss on mantine 7, those learns will also reflect here, not only for css-in-js cases.
21-
. We still need to add a better support for msw, but we are still learning how to use it properly.
22-
. Also we need to add a better support for testing, it's still a pain to work with it in general.
23-
. Our goal to have an opinionated and full swiss army knife version of Eruption ready to use, is still a work in progress. We don't have ATM the time to work on it, but we will get there eventually.
24-
25-
## v1.5.0
26-
27-
. Upgraded several libs to the latest version (Hello Vite 4.3).
28-
. Update the main README to use the create-eruption CLI.
29-
. Added GitHub Actions.
30-
31-
## v1.4.0
32-
33-
. Upgraded several libs to the latest version.
34-
. Stylelint v15 removed all style rules, making `stylelint-config-prettier` obsolete.
35-
. Several new `eslint-import` rules added for DX QoL.
36-
37-
## v1.3.0
38-
39-
. Upgraded Node to latest LTS version, v18 (hydrogen).
40-
. Upgraded Vite to v4.
41-
. Changed vite-react plugin to vite-react-swc.
42-
. Bumped dev dependencies to latest.
43-
44-
## v1.2.0
45-
46-
. Added msw as a dev dep, but still missing default config.
47-
. Changed minor configs to match vite@latest with focus on DX.
48-
49-
## v1.1.0
50-
51-
. Vite depedency updated to from v2 to v3.
52-
. Fixed missing .sh files for husky pre-commit and commit-msg hook.
53-
. Added missing config for promp-cli at commitlint.
54-
55-
## v1.0.0
56-
57-
. Eruption First Release.
58-
༼ つ ◕_◕ ༽つ🌋
59-
60-
## Know issue
61-
62-
1. on vitest/globals conflicting with testing-lib/jest-dom when running for build/preview scripts. Solutions provided were not sufficient to keep both globals working properly. As a fix, `"skipLibCheck": true,` from `tsconfig.json` was changed to `false`, in order to keep running those scripts.
5+
~ t a k e m y e n e r g y ~ ༼ つ ◕_◕ ༽つ🌋

README.md

Lines changed: 12 additions & 86 deletions
Original file line numberDiff line numberDiff line change
@@ -1,100 +1,26 @@
1-
# Eruption 🌋
1+
# how to publish
22

3-
> Boilerplate for React/Typescript, built on top of Vite ⚡️
3+
- run
44

5-
_It's fast! Even the tests are fast, thanks to Vite with Vitest ⚡️_
6-
7-
# What's in the boilerplate
8-
9-
- [Vite](https://vitejs.dev/)
10-
- [React](https://reactjs.org/)
11-
- [Typescript](https://www.typescriptlang.org/)
12-
- [Vitest](https://vitest.dev/)
13-
- [Testing Library](https://testing-library.com/)
14-
- Dev Tools
15-
- [ESLint](https://eslint.org/)
16-
- [Prettier](https://prettier.io/)
17-
- [CommitLint](https://commitlint.js.org/#/)
18-
- [Husky](https://typicode.github.io/husky/#/)
19-
- [Lint-Staged](https://github.com/okonet/lint-staged)
20-
21-
# Installation
22-
23-
There are two ways to install Eruption: using the template directly from GitHub (through the "Use Template" button), or using the [CLI](https://www.npmjs.com/package/create-eruption).
24-
25-
If you want to use the CLI, run the following command on your terminal:
26-
27-
```Bash
28-
npm init eruption@latest
29-
```
30-
31-
then, to start the project
32-
33-
```Bash
34-
cd your-project-name
35-
npm install
36-
npm run dev
5+
```bash
6+
npm login --scope=@<username> --registry=https://npm.pkg.github.com
377
```
388

39-
## Using with Docker
40-
41-
Pre-requisites:
42-
43-
- Install [Docker](https://www.docker.com/get-docker) for your platform.
44-
- Install [docker-compose](https://docs.docker.com/compose/install/) for your platform.
45-
46-
### Try with Docker
47-
48-
Making sure you're in your project directory, run:
9+
- authenticate with your github `username` and your `personal access token`:
4910

5011
```bash
51-
docker-compose -f docker-compose-dev.yml up
12+
Username: <username>
13+
Password: <personal access token>
5214
```
5315

54-
### Using on Production with Docker
55-
56-
DISCLAIMER: This Docker configuration is for demonstration purposes only. If you plan to use this configuration in a production remember to adjust the Dockerfile for your project's needs!
57-
58-
Making sure you're in your project directory, run:
16+
- If you have the right access with your token, you can then publish your package:
5917

6018
```bash
61-
docker-compose -f docker-compose.yml up
19+
npm publish
6220
```
6321

64-
_By default it uses port 80_
65-
66-
The production Dockerfile uses an nginx instance to run the built website, for more configuration options, see [nginx's dockerhub page](https://hub.docker.com/_/nginx)
22+
Then, if everything if your access is right, ti will be published to your github package registry and be available to install as a dependency in other projects:
6723

68-
## Try it online
69-
70-
Want to try Eruption without clone local? Try it on [StackBlitz](https://stackblitz.com/fork/github/eruptionjs/core)
71-
72-
# Commits
73-
74-
This project have commits configured to follow the Conventional Commits's best practice and it's configured with ESLint, Prettier and Stylelint.
75-
76-
To commit, you must follow the convention `<type>[optional scope]: <description>`. In practice, it would be as follow:
77-
78-
```git
79-
git commit -m "feat: add button component"
24+
```bash
25+
npm install @<username>/<package-name>
8026
```
81-
82-
Then, Husky will start the pre-commit hook and run lint-staged, who will run `prettier`, `lint` and `stylelint` to validate code format and code lint. If you fail to follow any of these validations, the commit will be aborted.
83-
84-
After that, if everything is validated correctly, Husky will proceed with the commit-msg hook, where it will evaluate if your commit message is following the Conventional Commit's best practice and later run the tests of your project. If any of the tests are broken, the commit will be aborted. You must fix the tests before proceed.
85-
86-
You can also commit your files with the help of the CLI. To do so, just run `npm run commit`. From there, the CLI will assist you in the proccess. As before: if your changes fails the validation, you must fix it before proceed.
87-
88-
As a best practice, it is strongly recommended that you do not skip the validations. If you need to change the way your commit messages are written, just go to file `commitlint.config.ts` and you will find there the config needed.
89-
90-
Check out [commitlint](https://commitlint.js.org/#/) docs to see further configurations that you can do.
91-
92-
# Motivation
93-
94-
Everything started because I was in need of a good, solid, reliable and fast boilerplate to work with React/Typescript projects. I was working with Create-React-App and Webpack but both of them wasn't that good at all, specially in performance. Later on I discovered that I could use Vite to replace Webpack, so here we are now. =)
95-
96-
I believe that Eruption as it is right now, is an excellent starting point to any React/Typescript project, with enough dev tools to help you to write the best software possible and ship to production without any headaches.
97-
98-
# License
99-
100-
MIT

package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
11
{
22
"name": "@devmozao/poc",
3-
"description": "Next Generation Boilerplate for React/Typescript, built on top of Vite ⚡️",
3+
"description": "poc for lib components",
44
"author": "@devMozao",
55
"private": false,
6-
"version": "1.0.0",
6+
"version": "0.0.1",
77
"license": "MIT",
8-
"homepage": "https://github.com/eruptionjs/core#readme",
9-
"bugs": "https://github.com/eruptionjs/core/issues",
8+
"homepage": "https://github.com/devmozao/poc",
9+
"bugs": "https://github.com/devmozao/poc",
1010
"main": "dist/main.js",
1111
"types": "dist/main.d.ts",
1212
"repository": {
1313
"type": "git",
1414
"url": "git://github.com/devmozao/poc.git"
1515
},
16+
"publishConfig": {
17+
"registry": "https://npm.pkg.github.com"
18+
},
1619
"files": [
1720
"dist"
1821
],
1922
"sideEffects": [
2023
"**/*.css"
2124
],
22-
"publishConfig": {
23-
"registry": "https://npm.pkg.github.com"
24-
},
2525
"scripts": {
2626
"dev": "vite",
2727
"start": "vite",

0 commit comments

Comments
 (0)