This commit is contained in:
Alex
2023-07-22 01:00:28 -04:00
parent 77444efbf2
commit 3debdb9e74
27 changed files with 1756 additions and 585 deletions

View File

@ -1,9 +1,16 @@
#!/bin/bash
rm dist/*.js
mkdir -p dist
./src/build-local-rules.ts
./esbuild.ts
npx tsc ./src/local/index.ts --outdir ./dist/local --target ESNext --module CommonJS >/dev/null
npx tsc ./src/basic.ts --outdir ./dist --declaration --target ESNext --module CommonJS >/dev/null
# Test
DEST=$HOME/Git/archive/node_modules
rm -rf "$DEST/@proteria/eslint-rules"
cp -r dist "$DEST/@proteria/eslint-rules"
type() {
npx dts-bundle-generator "./eslint-plugin-$1/$2" \
-o "./dist/$1/index.d.ts" \
--project "./eslint-plugin-$1/tsconfig.json" \
--no-check
}
# type import src/index.js
# type jsx-a11y src/index.js
# type react index.js