You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/guide/code-sharing.md
+5-23Lines changed: 5 additions & 23 deletions
Original file line number
Diff line number
Diff line change
@@ -25,9 +25,9 @@ If a "code sharing solution" is maintained by a framework that can often mean th
25
25
26
26
## Code Sharing Solutions
27
27
28
-
Here are a few solitions to **code-sharing**, each having their pros and cons.
28
+
Here are a few solutions to **code-sharing**, each having their pros and cons.
29
29
30
-
### Nrwl Nx DevTools with @nativescript/nx
30
+
### Nx with @nativescript/nx
31
31
32
32
[Learn More about @nativescript/nx](https://github.com/NativeScript/nx)
33
33
@@ -42,28 +42,10 @@ Here are a few solitions to **code-sharing**, each having their pros and cons.
42
42
43
43
- Learning curve if not used to Nx practices in general
44
44
45
-
### Nrwl Nx DevTools with @nstudio/xplat
45
+
### npm or yarn workspaces
46
46
47
-
[Learn more about @nstudio/xplat](https://nstudio.io/xplat)
48
-
49
-
**Pros:**
50
-
51
-
- It's centered around JavaScript/TypeScript (lesson 1 and 5 above)
52
-
- Uses standard build tooling like TypeScript or webpack to build code (lesson 2 above)
53
-
- No custom file extensions to deal with (lesson 3 above)
54
-
- Nx splits up "apps" and "libs" clearly identifying deployment/distribution targets "apps" that consume shared code "libs" (lesson 4 above)
55
-
- It builds upon @nativescript/nx to further scale it across more paradigms so it's a natural extension when needed if already working in Nx with @nativescript/nx
56
-
- Opinionated architecture is provided via xplat which helps to avoid common pitfalls from hard lessons learned in real world developments with cross platform mixtures
57
-
58
-
**Cons:**
59
-
60
-
- Learning curve if not used to Nx practices in general
61
-
- Learning curve if you have not developed applications in large codebases before
62
-
- Understanding the [basic fundamentals](https://nstudio.io/xplat/fundamentals/architecture) of the provided architecture
63
-
64
-
### Yarn workspaces
65
-
66
-
[Learn more about Yarn workspaces](https://classic.yarnpkg.com/en/docs/workspaces/)
47
+
-[Learn more about npm workspaces](https://docs.npmjs.com/cli/using-npm/workspaces/)
48
+
-[Learn more about Yarn workspaces](https://classic.yarnpkg.com/en/docs/workspaces/)
Copy file name to clipboardExpand all lines: content/plugins/plugin-workspace-guide.md
+5-5Lines changed: 5 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -128,7 +128,7 @@ At the prompt, enter the name of the package to add an `angular` folder to it wi
128
128
One of the nice benefits of using our plugin workspaces is updating them is made simple and efficient through Nx tooling. The TSC maintains plugin workspace migrations so whenever one is available you can update your plugin workspace with just a few simple commands (which will often provide dependency version bumps of supporting packages to latest NativeScript versions, configuration improvements, as well as other welcome additions to help you create and maintain NativeScript plugins):
129
129
130
130
```bash
131
-
yarn nx migrate @nativescript/plugin-tools
131
+
npx nx migrate @nativescript/plugin-tools
132
132
```
133
133
134
134
That will fetch `latest` version of `plugin-tools`, analyze the package to see if any migrations are available and then print a message if there are migrations to run.
@@ -137,10 +137,10 @@ Sometimes `@nativescript/plugin-tools` updates won't need any migrations so you
137
137
138
138
```bash
139
139
// install latest updates
140
-
yarn
140
+
npm install
141
141
142
142
// now run the migrations
143
-
yarn nx migrate --run-migrations=migrations.json
143
+
npx nx migrate --run-migrations=migrations.json
144
144
```
145
145
146
146
Your plugin workspace will now be up to date regarding various configurations, settings and core dependencies. Depending on other customizations you made there may be other things to adjust on your own.
@@ -161,7 +161,7 @@ Not very often actually. Most plugin workspaces can maintain it's set of depende
161
161
- TypeScript 5.6+
162
162
- Angular 19+
163
163
164
-
If you have any angular specific parts to your plugin, after running `yarn nx migrate @nativescript/plugin-tools` and then `yarn nx migrate --run-migrations ` with this migration you may see TypeScript errors like this:
164
+
If you have any angular specific parts to your plugin, after running `npx nx migrate @nativescript/plugin-tools` and then `npx nx migrate --run-migrations ` with this migration you may see TypeScript errors like this:
165
165
166
166
```bash
167
167
nativescript-checkbox/angular/index.ts:75:18 - error NG6008: Directive CheckedValueAccessor is standalone, and cannot be declared in an NgModule. Did you mean to import it instead?
@@ -184,7 +184,7 @@ This is expected with Angular 19. To resolve you can just add an explicit `stand
184
184
185
185
- Migrates to Nx 18.2.3, NativeScript 8.6, and TypeScript ~5.4.x.
186
186
187
-
After running `yarn nx migrate @nativescript/plugin-tools` and then `yarn nx migrate --run-migrations ` with this migration you'll likely see this message:
187
+
After running `npx nx migrate @nativescript/plugin-tools` and then `npx nx migrate --run-migrations ` with this migration you'll likely see this message:
188
188
189
189
```bash
190
190
[!] Some files can't be patched! You can run again with --verbose to get specific error detail. The following files are unable to be patched:
0 commit comments