@@ -71,7 +71,9 @@ To run tests:
71
71
make tests
72
72
```
73
73
74
- #### Using your local Sistent Fork in a Project
74
+ ### Using your local Sistent Fork in a Project
75
+
76
+ #### Method 1: Manual Installation
75
77
76
78
1 . Install your local Sistent package in the project
77
79
@@ -110,16 +112,80 @@ make build
110
112
make ui-build
111
113
```
112
114
113
- Now your project should reflect changes from your local Sistent fork.
115
+ Now, your project should reflect changes from your local Sistent fork.
114
116
115
117
If you want to remove the local Sistent fork from your project, run:
116
118
117
119
```
118
120
npm uninstall @layer5/sistent
119
121
```
120
122
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
122
169
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
+ ```
123
189
> [!NOTE]
124
190
> Avoid using `type any` in your code. Always specify explicit types to ensure type safety and maintainability.
125
191
0 commit comments