Skip to content

Commit

Permalink
docs: update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
jerrywu001 committed Dec 13, 2022
1 parent 34d18c9 commit b2c085b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ Use [vitepress](https://vitepress.vuejs.org/)/[quasar](https://quasar.dev/start/

## Register Components Globally

***ts work better with [email protected] plugin (volar@latest has some problem ) in .vue***

***is write with tsx, you can use volar@latest plugin***

```js
// main.ts
import SanpackPlugin from 'sandpack-vue3';
Expand All @@ -67,7 +71,7 @@ app.use(SanpackPlugin());
]
}
}
```
``

### registe components

Expand Down
5 changes: 2 additions & 3 deletions global.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ import {
SandpackCodeEditor,
SandpackCodeViewer,
SandpackPreview,
SandpackRunner,
SandpackStack,
SandpackTranspiledCode,
SandpackFileExplorer,
} from 'sandpack-vue3';

declare module '@vue/runtime-core' {
Expand All @@ -22,11 +22,10 @@ declare module '@vue/runtime-core' {
SandpackLayout: typeof SandpackLayout;
SandpackConsole: typeof SandpackConsole;
SandpackTests: typeof SandpackTests;
SandpackLayout: typeof SandpackLayout;
CodeEditor: typeof CodeEditor;
SandpackProvider: typeof SandpackProvider;
ErrorOverlay: typeof ErrorOverlay;
LoadingOverlay: typeof LoadingOverlay;
CodeEditor: typeof CodeEditor;
SandpackCodeEditor: typeof SandpackCodeEditor;
SandpackCodeViewer: typeof SandpackCodeViewer;
SandpackPreview: typeof SandpackPreview;
Expand Down
2 changes: 1 addition & 1 deletion playground/src/pages/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import isEqual from 'lodash.isequal';
import { ref } from 'vue';
import { githubLight, aquaBlue } from '@codesandbox/sandpack-themes';
import {
Sandpack,
// Sandpack,
// SandpackLayout,
// SandpackTranspiledCode,
// SandpackProvider,
Expand Down

0 comments on commit b2c085b

Please sign in to comment.