From 30cf991eeeaed6345b05927e6798ea300f3e6e11 Mon Sep 17 00:00:00 2001 From: Marc Kassay Date: Sat, 26 Feb 2022 14:05:52 -0500 Subject: [PATCH 1/2] docs: add yarn commands --- packages/nx/README.md | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/packages/nx/README.md b/packages/nx/README.md index 50327c520..60eb4be77 100644 --- a/packages/nx/README.md +++ b/packages/nx/README.md @@ -42,9 +42,16 @@ ### Create a new Nx workspace ```sh +# Using npm npx create-nx-workspace@latest --cli=nx --preset=empty -// If you run into any issue with latest Nx workspace version you may want to try the last known stable version with the following: +# Using yarn +yarn create nx-workspace --cli=nx --preset=empty --packageManager=yarn +``` + +If you run into any issue with latest Nx workspace version you may want to try the last known stable version with the following: + +```sh npx create-nx-workspace@12.4 --cli=nx --preset=empty ``` @@ -61,7 +68,11 @@ yarn add -D @nativescript/nx ### Create an app ```sh +# Using npm npx nx g @nativescript/nx:app [...options] + +# Using yarn +yarn nx g @nativescript/nx:app [...options] ``` This will generate: @@ -72,7 +83,7 @@ apps/nativescript- The NativeScript Nx plugin will prefix apps by default to help distinguish them against other apps in your workspace for clarity. -#### `--framework [angular]` +#### `--framework [angular|vanilla]` You will be prompted to choose a framework when this flag is ommitted. From 82d7854f2e9ac5604ac1e31a0835b010c4454da7 Mon Sep 17 00:00:00 2001 From: Marc Kassay Date: Sat, 26 Feb 2022 14:27:24 -0500 Subject: [PATCH 2/2] docs: add node pre checkout section --- packages/nx/README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/packages/nx/README.md b/packages/nx/README.md index 60eb4be77..54cd3cafa 100644 --- a/packages/nx/README.md +++ b/packages/nx/README.md @@ -39,6 +39,16 @@ ## Getting started +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). + +For an example, setting Yarn as your package manager, do the following: + +```sh +ns package-manager set yarn +``` + +Now create a Nx workspace using the yarn command expression in the following section. + ### Create a new Nx workspace ```sh