From 1c1300b9ef6dc0278b0cd02e40b974026ea780cf Mon Sep 17 00:00:00 2001 From: jbpenrath Date: Tue, 7 Jan 2025 17:31:50 +0100 Subject: [PATCH] =?UTF-8?q?=E2=AC=86=EF=B8=8F(tokens)=20migrate=20commande?= =?UTF-8?q?r.js=20to=2013.x=20from=2012.x?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Shortcut argument with several chars are no more accepted so we have to rename `-cwd` option to `-w`. --- .changeset/new-dragons-rescue.md | 5 +++++ packages/tokens/src/bin/ThemeGenerator.ts | 2 +- packages/tokens/src/bin/tests/Cunningham.spec.ts | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 .changeset/new-dragons-rescue.md diff --git a/.changeset/new-dragons-rescue.md b/.changeset/new-dragons-rescue.md new file mode 100644 index 0000000..eff08ce --- /dev/null +++ b/.changeset/new-dragons-rescue.md @@ -0,0 +1,5 @@ +--- +"@openfun/cunningham-tokens": minor +--- + +Replace `-cwd` option by `-w` diff --git a/packages/tokens/src/bin/ThemeGenerator.ts b/packages/tokens/src/bin/ThemeGenerator.ts index 9da9089..9619869 100644 --- a/packages/tokens/src/bin/ThemeGenerator.ts +++ b/packages/tokens/src/bin/ThemeGenerator.ts @@ -48,7 +48,7 @@ export const run = async (args: string[]) => { ":root", ) .option( - "-cwd, --working-dir ", + "-w, --working-dir ", "Specify the working dir ( you might not need this ).", ) .option( diff --git a/packages/tokens/src/bin/tests/Cunningham.spec.ts b/packages/tokens/src/bin/tests/Cunningham.spec.ts index 5986d2e..b73c5ee 100644 --- a/packages/tokens/src/bin/tests/Cunningham.spec.ts +++ b/packages/tokens/src/bin/tests/Cunningham.spec.ts @@ -133,7 +133,7 @@ describe("Cunningham Bin", () => { // We must run the bin directly to be sure that it compiles the TS file. ( Importing TS from // TS will always work ) - await runBin(`-g css -cwd ${__dirname}`); + await runBin(`-g css -w ${__dirname}`); expect(fs.existsSync(cssTokensFile)).toEqual(true); expect(fs.readFileSync(cssTokensFile).toString()).toContain(`