From 0bad7ae64dea6bad89445e3c063454106fbee99f Mon Sep 17 00:00:00 2001 From: Dsaquel Date: Sat, 25 Jan 2025 00:24:23 +0100 Subject: [PATCH 1/4] feat: add transform entry --- package.json | 5 +++++ vite.config.ts | 1 + 2 files changed, 6 insertions(+) diff --git a/package.json b/package.json index 224d015d..ac12203d 100644 --- a/package.json +++ b/package.json @@ -26,6 +26,11 @@ "import": "./dist/codemirror-editor.js", "require": null }, + "./transform": { + "types": "./dist/transform.d.ts", + "import": "./dist/transform.js", + "require": null + }, "./package.json": "./package.json", "./style.css": "./dist/vue-repl.css", "./dist/style.css": "./dist/vue-repl.css" diff --git a/vite.config.ts b/vite.config.ts index b07153ed..adcf2ee5 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -57,6 +57,7 @@ export default mergeConfig(base, { lib: { entry: { 'vue-repl': './src/index.ts', + transform: './src/transform.ts', 'monaco-editor': './src/editor/MonacoEditor.vue', 'codemirror-editor': './src/editor/CodeMirrorEditor.vue', }, From 7cf3a046d12de187e815e9859b17f894449d6a3b Mon Sep 17 00:00:00 2001 From: Dsaquel Date: Sat, 25 Jan 2025 00:40:26 +0100 Subject: [PATCH 2/4] chore: add store --- package.json | 5 +++++ vite.config.ts | 1 + 2 files changed, 6 insertions(+) diff --git a/package.json b/package.json index ac12203d..5484ff1b 100644 --- a/package.json +++ b/package.json @@ -26,6 +26,11 @@ "import": "./dist/codemirror-editor.js", "require": null }, + "./store": { + "types": "./dist/store.d.ts", + "import": "./dist/store.js", + "require": null + }, "./transform": { "types": "./dist/transform.d.ts", "import": "./dist/transform.js", diff --git a/vite.config.ts b/vite.config.ts index adcf2ee5..bdee0c49 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -57,6 +57,7 @@ export default mergeConfig(base, { lib: { entry: { 'vue-repl': './src/index.ts', + store: './src/store.ts', transform: './src/transform.ts', 'monaco-editor': './src/editor/MonacoEditor.vue', 'codemirror-editor': './src/editor/CodeMirrorEditor.vue', From 1255f8ad6e85c54a942152dc89d258c2b1f223ce Mon Sep 17 00:00:00 2001 From: Dsaquel Date: Sat, 25 Jan 2025 00:55:01 +0100 Subject: [PATCH 3/4] chore: move all tsx able to core.ts --- package.json | 11 +++-------- src/core.ts | 14 ++++++++++++++ src/index.ts | 15 +-------------- vite.config.ts | 3 +-- 4 files changed, 19 insertions(+), 24 deletions(-) create mode 100644 src/core.ts diff --git a/package.json b/package.json index 5484ff1b..d4cf5096 100644 --- a/package.json +++ b/package.json @@ -26,14 +26,9 @@ "import": "./dist/codemirror-editor.js", "require": null }, - "./store": { - "types": "./dist/store.d.ts", - "import": "./dist/store.js", - "require": null - }, - "./transform": { - "types": "./dist/transform.d.ts", - "import": "./dist/transform.js", + "./core": { + "types": "./dist/core.d.ts", + "import": "./dist/core.js", "require": null }, "./package.json": "./package.json", diff --git a/src/core.ts b/src/core.ts new file mode 100644 index 00000000..6f3b978b --- /dev/null +++ b/src/core.ts @@ -0,0 +1,14 @@ +export { + useStore, + File, + type SFCOptions, + type StoreState, + type Store, + type ReplStore, +} from './store' +export { useVueImportMap, mergeImportMap, type ImportMap } from './import-map' +export { compileFile } from './transform' +export type { Props as ReplProps } from './Repl.vue' +export type { SandboxProps } from './output/Sandbox.vue' +export type { OutputModes } from './types' +export { version as languageToolsVersion } from '@vue/language-service/package.json' diff --git a/src/index.ts b/src/index.ts index c18d25f9..6acf50e3 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,17 +1,4 @@ export { default as Repl } from './Repl.vue' export { default as Preview } from './output/Preview.vue' export { default as Sandbox } from './output/Sandbox.vue' -export type { SandboxProps } from './output/Sandbox.vue' -export { - useStore, - File, - type SFCOptions, - type StoreState, - type Store, - type ReplStore, -} from './store' -export { useVueImportMap, mergeImportMap, type ImportMap } from './import-map' -export { compileFile } from './transform' -export type { Props as ReplProps } from './Repl.vue' -export type { OutputModes } from './types' -export { version as languageToolsVersion } from '@vue/language-service/package.json' +export * from './core' diff --git a/vite.config.ts b/vite.config.ts index bdee0c49..1b007b87 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -57,8 +57,7 @@ export default mergeConfig(base, { lib: { entry: { 'vue-repl': './src/index.ts', - store: './src/store.ts', - transform: './src/transform.ts', + core: './src/core.ts', 'monaco-editor': './src/editor/MonacoEditor.vue', 'codemirror-editor': './src/editor/CodeMirrorEditor.vue', }, From f1795f3a8bd7ed1b0e3e7c2e93dff441b52fec57 Mon Sep 17 00:00:00 2001 From: Dsaquel Date: Mon, 17 Feb 2025 18:11:55 +0100 Subject: [PATCH 4/4] fix: update --- src/core.ts | 3 --- src/index.ts | 5 +++-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/core.ts b/src/core.ts index 6f3b978b..dc1b9dff 100644 --- a/src/core.ts +++ b/src/core.ts @@ -8,7 +8,4 @@ export { } from './store' export { useVueImportMap, mergeImportMap, type ImportMap } from './import-map' export { compileFile } from './transform' -export type { Props as ReplProps } from './Repl.vue' -export type { SandboxProps } from './output/Sandbox.vue' -export type { OutputModes } from './types' export { version as languageToolsVersion } from '@vue/language-service/package.json' diff --git a/src/index.ts b/src/index.ts index 6acf50e3..b055c6e6 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,4 +1,5 @@ -export { default as Repl } from './Repl.vue' +export { default as Repl, type Props as ReplProps } from './Repl.vue' export { default as Preview } from './output/Preview.vue' -export { default as Sandbox } from './output/Sandbox.vue' +export { default as Sandbox, type SandboxProps } from './output/Sandbox.vue' +export type { OutputModes } from './types' export * from './core'