@emporix/component-library 1.10.0 → 1.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +49 -0
- package/package.json +4 -1
package/README.md
CHANGED
|
@@ -1005,6 +1005,7 @@ npm run storybook
|
|
|
1005
1005
|
- `npm run test:coverage` - Run tests with coverage
|
|
1006
1006
|
- `npm run storybook` - Start Storybook
|
|
1007
1007
|
- `npm run build-storybook` - Build Storybook
|
|
1008
|
+
- `npm run build:pages` - Build showcase and Storybook for GitHub Pages
|
|
1008
1009
|
- `npm run lint` - Run ESLint
|
|
1009
1010
|
- `npm run lint:fix` - Fix ESLint issues
|
|
1010
1011
|
- `npm run type-check` - Run TypeScript type checking
|
|
@@ -1054,6 +1055,54 @@ The build output includes:
|
|
|
1054
1055
|
- TypeScript declarations (`index.d.ts`)
|
|
1055
1056
|
- CSS styles (`styles.css`)
|
|
1056
1057
|
|
|
1058
|
+
## Publishing
|
|
1059
|
+
|
|
1060
|
+
Releases are automated via GitHub Actions when you push a version tag. Pushing a tag triggers:
|
|
1061
|
+
|
|
1062
|
+
1. **npm publish** — builds the library (`npm run build:lib`) and publishes `@emporix/component-library` to the npm registry
|
|
1063
|
+
2. **GitHub Pages** — builds the showcase app (`npm run dev`) and static Storybook, then deploys both sites
|
|
1064
|
+
|
|
1065
|
+
### Live sites
|
|
1066
|
+
|
|
1067
|
+
After a successful release:
|
|
1068
|
+
|
|
1069
|
+
| Site | URL |
|
|
1070
|
+
| ------------------ | ------------------------------------------------------ |
|
|
1071
|
+
| Showcase (dev app) | https://emporix.github.io/component-library/ |
|
|
1072
|
+
| Storybook | https://emporix.github.io/component-library/storybook/ |
|
|
1073
|
+
|
|
1074
|
+
### One-time setup
|
|
1075
|
+
|
|
1076
|
+
In the GitHub repository, go to **Settings → Pages** and set **Source** to **GitHub Actions**.
|
|
1077
|
+
|
|
1078
|
+
npm publishing uses [trusted publishing](https://docs.npmjs.com/trusted-publishers) (OIDC) — ensure the npm package is configured to trust this repository’s `publish.yml` workflow.
|
|
1079
|
+
|
|
1080
|
+
### Release steps
|
|
1081
|
+
|
|
1082
|
+
1. **Bump the version** in `package.json` (and `package-lock.json` via `npm install` if needed):
|
|
1083
|
+
- **Minor** (`1.7.1` → `1.8.0`) for backward-compatible features
|
|
1084
|
+
- **Major** (`1.7.1` → `2.0.0`) for breaking changes
|
|
1085
|
+
- **Patch** (`1.7.1` → `1.7.2`) for bug fixes only
|
|
1086
|
+
2. **Merge** the version bump to the default branch.
|
|
1087
|
+
3. **Create and push a tag** that matches `package.json` exactly (prefix with `v`):
|
|
1088
|
+
|
|
1089
|
+
```bash
|
|
1090
|
+
# Example: package.json version is 1.10.0
|
|
1091
|
+
git tag v1.10.0
|
|
1092
|
+
git push origin v1.10.0
|
|
1093
|
+
```
|
|
1094
|
+
|
|
1095
|
+
The tag must match the format `v{semver}` (e.g. `v1.2.3`). CI rejects tags that do not match `package.json`.
|
|
1096
|
+
|
|
1097
|
+
### Preview GitHub Pages locally
|
|
1098
|
+
|
|
1099
|
+
```bash
|
|
1100
|
+
npm run build:pages
|
|
1101
|
+
npx serve gh-pages
|
|
1102
|
+
```
|
|
1103
|
+
|
|
1104
|
+
Open http://localhost:3000/component-library/ (showcase) and http://localhost:3000/component-library/storybook/ (Storybook).
|
|
1105
|
+
|
|
1057
1106
|
## Code Formatting
|
|
1058
1107
|
|
|
1059
1108
|
This project uses Prettier for consistent code formatting. The configuration is defined in `.prettierrc`.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@emporix/component-library",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.11.0",
|
|
4
4
|
"description": "A React component library for Emporix projects",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.umd.js",
|
|
@@ -38,6 +38,9 @@
|
|
|
38
38
|
"test:coverage": "vitest --coverage",
|
|
39
39
|
"storybook": "storybook dev -p 6006",
|
|
40
40
|
"build-storybook": "storybook build",
|
|
41
|
+
"build:showcase:pages": "VITE_BASE_PATH=/component-library/ npm run build",
|
|
42
|
+
"build-storybook:pages": "STORYBOOK_BASE_PATH=/component-library/storybook/ npm run build-storybook",
|
|
43
|
+
"build:pages": "npm run build:showcase:pages && npm run build-storybook:pages && node scripts/assemble-pages.mjs",
|
|
41
44
|
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
|
|
42
45
|
"lint:fix": "eslint . --ext ts,tsx --fix",
|
|
43
46
|
"type-check": "tsc --noEmit",
|