From 0efba432b83748842a19c44aa617c8f80a1857cb Mon Sep 17 00:00:00 2001 From: Connor Sullivan Date: Tue, 6 Aug 2024 08:45:52 -0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=9D=20Clarify=20double=20quotes=20in?= =?UTF-8?q?=20README?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Clarifies using double quotes for Windows compatibility in README. --- README.md | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 0aab567..632b161 100644 --- a/README.md +++ b/README.md @@ -35,12 +35,14 @@ npm install --save-dev css-typed Run `css-typed` and pass it a glob targeting your CSS files. ```shell -npx css-typed 'src/**/*.css' +npx css-typed "src/**/*.css" ``` This will generate `.d.css.ts` files next to the original source files. -> **Note** +See the [run script recipe](#run-script) for adding to your `package.json`. + +> [!NOTE] > > A CSS module file with the name `foo.module.css` will emit `foo.module.d.css.ts`. @@ -114,7 +116,7 @@ For example, `my-class` becomes `myClass` and you cannot use `my-class` in JS/TS Modern bundlers or build system such as Vite and Gatsby support this transformation. The default matches CSS naming practices (`kebab-case`). -> **IMPORTANT** +> [!IMPORTANT] > > Note that `camelCase` and `dashes` MAY have TypeScript bugs. > TypeScript 5.6 may help with the named exports for these. @@ -127,18 +129,23 @@ The default matches CSS naming practices (`kebab-case`). ### Run script -To run it as part of your build, you will likely include it as a run script, maybe as `codegen` or `pretsc`. +To run it as part of your build, you will likely include it as a run script, maybe as `codegen`, `css-typed`, or `pretsc`. ```json { "scripts": { "codegen": "css-typed \"src/**/*.css\"", + "css-typed": "css-typed \"src/**/*.css\"", "pretsc": "css-typed \"src/**/*.css\"", "tsc": "tsc" } } ``` +> [!NOTE] +> +> Use `\"` in your run scripts for Windows OS compatibility. + ### Watch The CLI does not have built-in watch support.