From b028beb9c6444a5f7e13fed8b92d41420871226b Mon Sep 17 00:00:00 2001 From: Kilian Panot Date: Sat, 27 Jan 2024 23:21:40 +0900 Subject: [PATCH] chore: add documentation regarding restriction of npm create command --- packages/@ama-sdk/create/README.md | 12 +++++++++--- packages/@ama-sdk/create/package.json | 4 +++- packages/@o3r/create/README.md | 12 +++++++++--- packages/@o3r/create/package.json | 4 +++- 4 files changed, 24 insertions(+), 8 deletions(-) diff --git a/packages/@ama-sdk/create/README.md b/packages/@ama-sdk/create/README.md index 54a5fd63ea..213b209184 100644 --- a/packages/@ama-sdk/create/README.md +++ b/packages/@ama-sdk/create/README.md @@ -9,18 +9,24 @@ This package is simplifying the start of new SDK repository. ## Usage -### NPM - ```shell npm create @ama-sdk typescript -- [...options] ``` -### Yarn +or ```shell yarn create @ama-sdk typescript [...options] ``` +> **Warning** : Please notice that the command `yarn create` is **not** available for versions *>= 2.0.0* (see [Yarn cli commands](https://yarnpkg.com/cli)). + +You can generate an environment with a specific package manager thanks to the `--package-manager` options: + +```shell +npm create @ama-sdk typescript -- --package-manager=yarn [...options] +``` + ## Options list - `--spec-path`: Path to the swagger/open-api specification used to generate the SDK diff --git a/packages/@ama-sdk/create/package.json b/packages/@ama-sdk/create/package.json index 05c64d9859..f314b07232 100644 --- a/packages/@ama-sdk/create/package.json +++ b/packages/@ama-sdk/create/package.json @@ -65,6 +65,8 @@ "type-fest": "^4.3.1" }, "engines": { - "node": ">=18.0.0" + "node": ">=18.0.0", + "yarn": "<2.0.0", + "npm": "*" } } diff --git a/packages/@o3r/create/README.md b/packages/@o3r/create/README.md index 66ec4999da..2147dea3de 100644 --- a/packages/@o3r/create/README.md +++ b/packages/@o3r/create/README.md @@ -9,14 +9,20 @@ This package is simplifying the start of an [Otter Framework](https://github.com ## Usage -### NPM - ```shell npm create @o3r -- [...options] ``` -### Yarn +or ```shell yarn create @o3r [...options] ``` + +> **Warning** : Please notice that the command `yarn create` is **not** available for versions *>= 2.0.0* (see [Yarn cli commands](https://yarnpkg.com/cli)). + +You can generate an environment with a specific package manager thanks to the `--package-manager` options: + +```shell +npm create @o3r -- --package-manager=yarn [...options] +``` diff --git a/packages/@o3r/create/package.json b/packages/@o3r/create/package.json index cd072a5098..637942bb5c 100644 --- a/packages/@o3r/create/package.json +++ b/packages/@o3r/create/package.json @@ -57,6 +57,8 @@ "typescript": "~5.2.2" }, "engines": { - "node": ">=18.0.0" + "node": ">=18.0.0", + "yarn": "<2.0.0", + "npm": "*" } }