Skip to content

Commit

Permalink
fix: export ESM
Browse files Browse the repository at this point in the history
  • Loading branch information
bhsd-harry committed Dec 19, 2024
1 parent bf71692 commit f81ff0a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion build.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
#!/usr/local/bin/bash
rm -rf dist/
tsc && npm run declaration
tsc && npm run declaration && npx esbuild ./util/sharable.ts --charset=utf8 --target=es2023 --format=esm --outfile=dist/util/sharable.mjs
if [[ $? -eq 0 ]]
then
mv dist/util/sharable.d.ts .
rm dist/internal.js dist/[abptu]*/*.d.ts
cp sharable.d.ts dist/util/sharable.d.mts
mv sharable.d.ts dist/util/
bash sed.sh -i '/export declare const /,$d' dist/mixin/*.d.ts
echo 'declare global { type Acceptable = unknown; }' >> dist/index.d.ts
Expand Down
2 changes: 1 addition & 1 deletion extensions/typings.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import type {
} from '@codemirror/lint';
import type {editor} from 'monaco-editor';
import type {CodeJar} from 'codejar-async';
import type {Config, LintError, AST} from '../base';
import type {Config, LintError, AST} from 'wikiparser-node';

export type {
AST,
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"/errors/README",
"/printed/README",
"/bundle/bundle.*.js",
"/extensions/typings.d.ts",
"/extensions/dist/",
"/extensions/*.css",
"!/extensions/dist/gh-page.js",
Expand Down

0 comments on commit f81ff0a

Please sign in to comment.