chore: Move from bin to scripts.

This commit is contained in:
Sidharth Vinod 2022-11-07 14:06:35 +05:30
parent f295424087
commit 1304e8b00b
No known key found for this signature in database
GPG Key ID: FB5CCD378D3907CD
3 changed files with 9 additions and 2 deletions

View File

@ -1,4 +1,4 @@
{
"!(docs/**/*)*.{ts,js,json,html,md,mts}": ["eslint --fix", "prettier --write"],
"cSpell.json": ["ts-node-esm bin/fixCSpell.ts"]
"cSpell.json": ["ts-node-esm scripts/fixCSpell.ts"]
}

View File

@ -33,7 +33,7 @@
"dev": "concurrently \"pnpm build:vite --watch\" \"ts-node-esm .vite/server.ts\"",
"release": "pnpm build",
"lint": "eslint --cache --ignore-path .gitignore . && pnpm --filter mermaid run lint:jison && prettier --check .",
"lint:fix": "eslint --fix --ignore-path .gitignore . && prettier --write . && ts-node-esm bin/fixCSpell.ts",
"lint:fix": "eslint --fix --ignore-path .gitignore . && prettier --write . && ts-node-esm scripts/fixCSpell.ts",
"cypress": "cypress run",
"cypress:open": "cypress open",
"e2e": "start-server-and-test dev http://localhost:9000/ cypress",

View File

@ -1,3 +1,10 @@
/**
* Sorts all the `words` in the cSpell.json file.
*
* Run from the same folder as the `cSpell.json` file
* (i.e. the root of the Mermaid project).
*/
import { readFileSync, writeFileSync } from 'node:fs';
import prettier from 'prettier';