Skip to content

Commit

Permalink
fix: ci
Browse files Browse the repository at this point in the history
  • Loading branch information
KermanX committed Apr 28, 2024
1 parent 555c45a commit 25355c2
Show file tree
Hide file tree
Showing 5 changed files with 118 additions and 48 deletions.
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,6 @@
"json",
"jsonc",
"yaml"
]
],
"vitest.disableWorkspaceWarning": true
}
74 changes: 74 additions & 0 deletions docs/vite.config.ts.timestamp-1714283273745-edf44ed80a529.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
// vite.config.ts
import { resolve } from "node:path";
import { defineConfig } from "file:///D:/workspace/vite/packages/vite/dist/node/index.js";
import Icons from "file:///D:/workspace/slidev/slidev/node_modules/.pnpm/[email protected]_@[email protected]/node_modules/unplugin-icons/dist/vite.js";

Check failure on line 4 in docs/vite.config.ts.timestamp-1714283273745-edf44ed80a529.mjs

View workflow job for this annotation

GitHub Actions / autofix

Do not import modules in `node_modules` folder by path
import IconsResolver from "file:///D:/workspace/slidev/slidev/node_modules/.pnpm/[email protected]_@[email protected]/node_modules/unplugin-icons/dist/resolver.js";

Check failure on line 5 in docs/vite.config.ts.timestamp-1714283273745-edf44ed80a529.mjs

View workflow job for this annotation

GitHub Actions / autofix

Do not import modules in `node_modules` folder by path
import Components from "file:///D:/workspace/slidev/slidev/node_modules/.pnpm/[email protected][email protected]/node_modules/unplugin-vue-components/dist/vite.js";

Check failure on line 6 in docs/vite.config.ts.timestamp-1714283273745-edf44ed80a529.mjs

View workflow job for this annotation

GitHub Actions / autofix

Do not import modules in `node_modules` folder by path
import Inspect from "file:///D:/workspace/slidev/slidev/node_modules/.pnpm/[email protected][email protected]/node_modules/vite-plugin-inspect/dist/index.mjs";

Check failure on line 7 in docs/vite.config.ts.timestamp-1714283273745-edf44ed80a529.mjs

View workflow job for this annotation

GitHub Actions / autofix

Do not import modules in `node_modules` folder by path
import UnoCSS from "file:///D:/workspace/slidev/slidev/node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/unocss/dist/vite.mjs";

Check failure on line 8 in docs/vite.config.ts.timestamp-1714283273745-edf44ed80a529.mjs

View workflow job for this annotation

GitHub Actions / autofix

Do not import modules in `node_modules` folder by path
var __vite_injected_original_dirname = "D:\\workspace\\slidev\\slidev\\docs";
var vite_config_default = defineConfig({
resolve: {
alias: {
"@slidev/client/": `${resolve(__vite_injected_original_dirname, ".vitepress/@slidev/client")}/`,
"@slidev/parser": resolve(__vite_injected_original_dirname, ".vitepress/@slidev/parser"),
"@slidev/theme-default": resolve(__vite_injected_original_dirname, ".vitepress/@slidev/theme-default")
}
},
optimizeDeps: {
exclude: [
"vue-demi",
"@vueuse/shared",
"@vueuse/core"
]
},
server: {
hmr: {
overlay: false
}
},
plugins: [
Components({
dirs: [
"./.vitepress/theme/components",
"./.vitepress/@slidev/client/builtin"
],
extensions: ["vue", "md"],
include: [/\.vue$/, /\.vue\?vue/, /\.md$/],
resolvers: [
IconsResolver({
prefix: ""
})
]
}),
Icons({
defaultStyle: "display: inline-block;"
}),
Inspect(),
UnoCSS(),
{
name: "code-block-escape",
enforce: "post",
transform(code, id) {
if (!id.endsWith(".md"))
return;
return code.replace(/\/\/```/mg, "```");
}
},
{
name: "virtual-modules",
resolveId(id) {
return id === "/@slidev/configs" ? id : null;
},
load(id) {
if (id !== "/@slidev/configs")
return;
return "export default {}";
}
}
]
});
export {
vite_config_default as default
};
//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsidml0ZS5jb25maWcudHMiXSwKICAic291cmNlc0NvbnRlbnQiOiBbImNvbnN0IF9fdml0ZV9pbmplY3RlZF9vcmlnaW5hbF9kaXJuYW1lID0gXCJEOlxcXFx3b3Jrc3BhY2VcXFxcc2xpZGV2XFxcXHNsaWRldlxcXFxkb2NzXCI7Y29uc3QgX192aXRlX2luamVjdGVkX29yaWdpbmFsX2ZpbGVuYW1lID0gXCJEOlxcXFx3b3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xRQUFRO0FBQUEsSUFDTixLQUFLO0FBQUEsTUFDSCxTQUFTO0FBQUEsSUFDWDtBQUFBLEVBQ0Y7QUFBQSxFQUNBLFNBQVM7QUFBQSxJQUNQLFdBQVc7QUFBQSxNQUNULE1BQU07QUFBQSxRQUNKO0FBQUEsUUFDQTtBQUFBLE1BQ0Y7QUFBQSxNQUNBLFlBQVksQ0FBQyxPQUFPLElBQUk7QUFBQSxNQUN4QixTQUFTLENBQUMsVUFBVSxjQUFjLE9BQU87QUFBQSxNQUN6QyxXQUFXO0FBQUEsUUFDVCxjQUFjO0FBQUEsVUFDWixRQUFRO0FBQUEsUUFDVixDQUFDO0FBQUEsTUFDSDtBQUFBLElBQ0YsQ0FBQztBQUFBLElBQ0QsTUFBTTtBQUFBLE1BQ0osY0FBYztBQUFBLElBQ2hCLENBQUM7QUFBQSxJQUNELFFBQVE7QUFBQSxJQUNSLE9BQU87QUFBQSxJQUNQO0FBQUEsTUFDRSxNQUFNO0FBQUEsTUFDTixTQUFTO0FBQUEsTUFDVCxVQUFVLE1BQU0sSUFBSTtBQUNsQixZQUFJLENBQUMsR0FBRyxTQUFTLEtBQUs7QUFDcEI7QUFDRixlQUFPLEtBQUssUUFBUSxhQUFhLEtBQUs7QUFBQSxNQUN4QztBQUFBLElBQ0Y7QUFBQSxJQUNBO0FBQUEsTUFDRSxNQUFNO0FBQUEsTUFDTixVQUFVLElBQUk7QUFDWixlQUFPLE9BQU8scUJBQXFCLEtBQUs7QUFBQSxNQUMxQztBQUFBLE1BQ0EsS0FBSyxJQUFJO0FBQ1AsWUFBSSxPQUFPO0FBQ1Q7QUFDRixlQUFPO0FBQUEsTUFDVDtBQUFBLElBQ0Y7QUFBQSxFQUNGO0FBQ0YsQ0FBQzsiLAogICJuYW1lcyI6IFtdCn0K
3 changes: 2 additions & 1 deletion packages/vscode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"publisher": "antfu",
"name": "slidev",
"displayName": "Slidev",
"type": "module",
"preview": true,
"version": "0.5.0",
"description": "Slidev support for VS Code",
Expand Down Expand Up @@ -126,7 +127,7 @@
},
"scripts": {
"vscode:prepublish": "nr build",
"build": "tsup",
"build": "tsup --env.NODE_ENV production",
"dev": "nr build --watch"
},
"devDependencies": {
Expand Down
5 changes: 2 additions & 3 deletions packages/vscode/src/composables/useDocumentText.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { onScopeDispose, shallowRef, watchEffect } from '@vue/runtime-core'
import type { MaybeRefOrGetter } from '@vueuse/core'
import { toValue } from '@vueuse/core'
import type { MaybeRefOrGetter } from '@vue/runtime-core'
import { onScopeDispose, shallowRef, toValue, watchEffect } from '@vue/runtime-core'
import type { TextDocument } from 'vscode'
import { workspace } from 'vscode'

Expand Down
Loading

0 comments on commit 25355c2

Please sign in to comment.