Skip to content

Commit f65acb4

Browse files
authored
chore: doc update for yarn (#46)
1 parent 6024c87 commit f65acb4

File tree

1 file changed

+23
-2
lines changed

1 file changed

+23
-2
lines changed

packages/nx/README.md

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,29 @@
3939

4040
## Getting started
4141

42+
Prior to executing any commands, ensure that the node package manager you're going to use is set for NativeScript (more info at ['Package Managers'](https://docs.nativescript.org/development-workflow.html#package-managers) section of docs) and Nx (more info at ['Nx DevKit - Module'](https://nx.dev/nx-devkit/index#package-manager-type-aliases-1) section of docs).
43+
44+
For an example, setting Yarn as your package manager, do the following:
45+
46+
```sh
47+
ns package-manager set yarn
48+
```
49+
50+
Now create a Nx workspace using the yarn command expression in the following section.
51+
4252
### Create a new Nx workspace
4353

4454
```sh
55+
# Using npm
4556
npx create-nx-workspace@latest --cli=nx --preset=empty
4657

47-
// If you run into any issue with latest Nx workspace version you may want to try the last known stable version with the following:
58+
# Using yarn
59+
yarn create nx-workspace --cli=nx --preset=empty --packageManager=yarn
60+
```
61+
62+
If you run into any issue with latest Nx workspace version you may want to try the last known stable version with the following:
63+
64+
```sh
4865
npx [email protected] --cli=nx --preset=empty
4966
```
5067

@@ -61,7 +78,11 @@ yarn add -D @nativescript/nx
6178
### Create an app
6279

6380
```sh
81+
# Using npm
6482
npx nx g @nativescript/nx:app <app-name> [...options]
83+
84+
# Using yarn
85+
yarn nx g @nativescript/nx:app <app-name> [...options]
6586
```
6687

6788
This will generate:
@@ -72,7 +93,7 @@ apps/nativescript-<app-name>
7293

7394
The NativeScript Nx plugin will prefix apps by default to help distinguish them against other apps in your workspace for clarity.
7495

75-
#### `--framework [angular]`
96+
#### `--framework [angular|vanilla]`
7697

7798
You will be prompted to choose a framework when this flag is ommitted.
7899

0 commit comments

Comments
 (0)