diff options
author | Kristóf Marussy <kristof@marussy.com> | 2022-08-12 19:54:46 +0200 |
---|---|---|
committer | Kristóf Marussy <kristof@marussy.com> | 2022-08-12 19:54:46 +0200 |
commit | d22c3b0c257f5daf5b401988a35ab9ce981a2341 (patch) | |
tree | 0a661c927c37b52197326d1c05e211daf9bd19e5 /subprojects/frontend/types | |
parent | fix(language): rule parsing test (diff) | |
download | refinery-d22c3b0c257f5daf5b401988a35ab9ce981a2341.tar.gz refinery-d22c3b0c257f5daf5b401988a35ab9ce981a2341.tar.zst refinery-d22c3b0c257f5daf5b401988a35ab9ce981a2341.zip |
refactor(frontend): move from Webpack to Vite
Also overhaulds the building and linting for frontend assets.
Diffstat (limited to 'subprojects/frontend/types')
-rw-r--r-- | subprojects/frontend/types/ImportMeta.d.ts | 9 | ||||
-rw-r--r-- | subprojects/frontend/types/grammar.d.ts | 5 | ||||
-rw-r--r-- | subprojects/frontend/types/node/@lezer-generator-rollup.d.ts | 7 |
3 files changed, 21 insertions, 0 deletions
diff --git a/subprojects/frontend/types/ImportMeta.d.ts b/subprojects/frontend/types/ImportMeta.d.ts new file mode 100644 index 00000000..2008e268 --- /dev/null +++ b/subprojects/frontend/types/ImportMeta.d.ts | |||
@@ -0,0 +1,9 @@ | |||
1 | interface ImportMeta { | ||
2 | env: { | ||
3 | DEV: boolean; | ||
4 | MODE: string; | ||
5 | PROD: boolean; | ||
6 | VITE_PACKAGE_NAME: string; | ||
7 | VITE_PACKAGE_VERSION: string; | ||
8 | }; | ||
9 | } | ||
diff --git a/subprojects/frontend/types/grammar.d.ts b/subprojects/frontend/types/grammar.d.ts new file mode 100644 index 00000000..1480085b --- /dev/null +++ b/subprojects/frontend/types/grammar.d.ts | |||
@@ -0,0 +1,5 @@ | |||
1 | declare module '*.grammar' { | ||
2 | import type { LRParser } from '@lezer/lr'; | ||
3 | |||
4 | export const parser: LRParser; | ||
5 | } | ||
diff --git a/subprojects/frontend/types/node/@lezer-generator-rollup.d.ts b/subprojects/frontend/types/node/@lezer-generator-rollup.d.ts new file mode 100644 index 00000000..dea39ec9 --- /dev/null +++ b/subprojects/frontend/types/node/@lezer-generator-rollup.d.ts | |||
@@ -0,0 +1,7 @@ | |||
1 | // We have to explicitly redeclare the type of the `./rollup` ESM export of `@lezer/generator`, | ||
2 | // because TypeScript can't find it on its own even with `"moduleResolution": "Node16"`. | ||
3 | declare module '@lezer/generator/rollup' { | ||
4 | import type { Plugin } from 'rollup'; | ||
5 | |||
6 | export function lezer(): Plugin; | ||
7 | } | ||