Skip to content

Commit 7e263fb

Browse files
authored
Merge pull request #1047 from M-DEV-1/patch-1
update: README with local Sistent installation and linking methods
2 parents 873ef35 + f655047 commit 7e263fb

File tree

1 file changed

+69
-3
lines changed

1 file changed

+69
-3
lines changed

README.md

Lines changed: 69 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,9 @@ To run tests:
7171
make tests
7272
```
7373

74-
#### Using your local Sistent Fork in a Project
74+
### Using your local Sistent Fork in a Project
75+
76+
#### Method 1: Manual Installation
7577

7678
1. Install your local Sistent package in the project
7779

@@ -110,16 +112,80 @@ make build
110112
make ui-build
111113
```
112114
113-
Now your project should reflect changes from your local Sistent fork.
115+
Now, your project should reflect changes from your local Sistent fork.
114116
115117
If you want to remove the local Sistent fork from your project, run:
116118
117119
```
118120
npm uninstall @layer5/sistent
119121
```
120122
121-
This will remove the local Sistent package from your project. You will have to install the standard package again after running this command.
123+
This will remove the local Sistent package from your project. You will have to reinstall the official package using this command:
124+
```
125+
npm install @layer5/sistent
126+
```
127+
128+
#### Method 2: Using `npm link`
129+
130+
1. Create a link of your local Sistent fork
131+
132+
```
133+
cd <path-to-sistent-on-local-machine>
134+
135+
npm link
136+
```
137+
138+
This creates a global symlink which points to the local Sistent fork.
139+
140+
2. Link the local Sistent fork to your project
141+
142+
```
143+
npm link @layer5/sistent
144+
```
145+
146+
3.Build your local Sistent fork
147+
148+
After making changes to your fork, run this command in your local Sistent package.
149+
150+
```
151+
make build
152+
```
153+
154+
4. Run the build command in the project where your local Sistent fork is installed.
155+
156+
```
157+
# example, Meshery UI
158+
make ui-build
159+
```
160+
161+
Now, your project should reflect changes from your local Sistent fork.
162+
163+
5. Verify that your local Sistent fork has been correctly linked.
164+
165+
To verify that the correct link has been created, run this command:
166+
167+
```
168+
npm ls -g
122169

170+
# Expected output:
171+
# ├── @layer5/sistent@0.14.11 -> ./../../../../<path-to-local-sistent-fork>
172+
```
173+
174+
To verify that the created link is correctly used in your project, run this command in the directory where you linked the Sistent fork:
175+
176+
```
177+
ls -l node_modules/@layer5/sistent
178+
179+
# Expected output:
180+
# node_modules/@layer5/sistent -> ../../../../../sistent
181+
```
182+
183+
To revert back to the official package, first unlink the package, then install the official package using the following commands:
184+
185+
```
186+
npm unlink @layer5/sistent
187+
npm install @layer5/sistent
188+
```
123189
> [!NOTE]
124190
> Avoid using `type any` in your code. Always specify explicit types to ensure type safety and maintainability.
125191

0 commit comments

Comments
 (0)