@banch0u/core-project-test-repository 1.1.0 β 1.2.1
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 +91 -0
- package/package.json +13 -7
package/README.md
ADDED
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
# π¦ @banch0u/core-project-test-repository β Development & Deployment Guide
|
|
2
|
+
|
|
3
|
+
## β¨ Live Development Setup
|
|
4
|
+
|
|
5
|
+
To develop and test changes in the core package **live** within another project (e.g., `docflow, hr, contract, account and etc.`):
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
### π Step 1: Start the Core Package in Watch Mode
|
|
10
|
+
|
|
11
|
+
This will watch your `src/` directory for changes, rebuild the `dist/` folder, and automatically push updates to `.yalc`.
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
npm run dev
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
### π Step 2: In Your Main Project (Consumer App)
|
|
20
|
+
|
|
21
|
+
#### β
a. Add the Core Package via Yalc
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
yalc add @banch0u/core-project-test-repository
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
This will copy the current `dist/` into your projectβs `.yalc` folder and update your `package.json`.
|
|
28
|
+
|
|
29
|
+
#### π b. Link the Core Package
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
yalc link @banch0u/core-project-test-repository
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
This creates a symlink to the core package. Now, all changes from the `npm run dev` watcher will reflect in your main app automatically when running the dev server (`npm start`).
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
### β οΈ Important Notes
|
|
40
|
+
|
|
41
|
+
- Your `package.json` will temporarily contain this line:
|
|
42
|
+
|
|
43
|
+
```json
|
|
44
|
+
"@banch0u/core-project-test-repository": "file:.yalc/@banch0u/core-project-test-repository"
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
- **This file path will break production builds or CI/CD pipelines.**
|
|
48
|
+
|
|
49
|
+
#### β
Before Deploying or Committing:
|
|
50
|
+
|
|
51
|
+
Replace the local Yalc reference with the actual npm package:
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
npm install @banch0u/core-project-test-repository@latest
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
---
|
|
58
|
+
|
|
59
|
+
## π¦ Publishing to NPM
|
|
60
|
+
|
|
61
|
+
### 1. Build the Package
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
npm run build
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
This will transpile your `src/` folder into the `dist/` folder.
|
|
68
|
+
|
|
69
|
+
### 2. Bump Version
|
|
70
|
+
|
|
71
|
+
Use `npm version` to update the package version according to the type of change:
|
|
72
|
+
|
|
73
|
+
- **Patch** (small fix): `npm version patch` β `1.0.0 β 1.0.1`
|
|
74
|
+
- **Minor** (new feature, backward compatible): `npm version minor` β `1.0.0 β 1.1.0`
|
|
75
|
+
- **Major** (breaking changes): `npm version major` β `1.0.0 β 2.0.0`
|
|
76
|
+
|
|
77
|
+
### 3. Publish to NPM
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
npm publish
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
Your changes will now be available on the npm registry. Consumers can install the latest version via:
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
npm install @banch0u/core-project-test-repository@latest
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
---
|
|
90
|
+
|
|
91
|
+
Happy coding π»π
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@banch0u/core-project-test-repository",
|
|
3
|
-
"version": "1.1
|
|
3
|
+
"version": "1.2.1",
|
|
4
4
|
"description": "Shared core features for all projects",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"files": [
|
|
@@ -14,15 +14,19 @@
|
|
|
14
14
|
"author": "banch0u",
|
|
15
15
|
"license": "MIT",
|
|
16
16
|
"scripts": {
|
|
17
|
-
"build": "babel src --out-dir dist --copy-files"
|
|
17
|
+
"build": "babel src --out-dir dist --copy-files",
|
|
18
|
+
"watch": "chokidar \"src\" -i 'dist' -c \"npm run build && yalc push --force\"",
|
|
19
|
+
"dev": "npm run watch"
|
|
18
20
|
},
|
|
19
21
|
"dependencies": {
|
|
20
22
|
"@microsoft/signalr": "^8.0.7",
|
|
21
23
|
"@pdftron/webviewer": "^11.2.0",
|
|
22
|
-
"antd": "^5.16.0"
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
"react
|
|
24
|
+
"antd": "^5.16.0"
|
|
25
|
+
},
|
|
26
|
+
"peerDependencies": {
|
|
27
|
+
"react": "^18.0.0 || ^19.0.0",
|
|
28
|
+
"react-dom": "^18.0.0 || ^19.0.0",
|
|
29
|
+
"react-router-dom": "^6.0.0"
|
|
26
30
|
},
|
|
27
31
|
"devDependencies": {
|
|
28
32
|
"@babel/cli": "^7.26.4",
|
|
@@ -30,6 +34,8 @@
|
|
|
30
34
|
"@babel/plugin-transform-runtime": "^7.26.9",
|
|
31
35
|
"@babel/preset-env": "^7.26.9",
|
|
32
36
|
"@babel/preset-react": "^7.26.3",
|
|
33
|
-
"babel-loader": "^9.2.1"
|
|
37
|
+
"babel-loader": "^9.2.1",
|
|
38
|
+
"chokidar-cli": "^3.0.0",
|
|
39
|
+
"npm-run-all": "^4.1.5"
|
|
34
40
|
}
|
|
35
41
|
}
|