mirror of
https://github.com/ueberdosis/tiptap.git
synced 2025-01-18 14:13:21 +08:00
open files in vscode in development
This commit is contained in:
parent
1ab817295c
commit
5723b1b761
@ -1,5 +1,13 @@
|
||||
export default function (Vue, options, context) {
|
||||
|
||||
Vue.mixin({
|
||||
data() {
|
||||
return {
|
||||
cwd: options.cwd,
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
context.router.afterEach(to => {
|
||||
if (to.hash) {
|
||||
setTimeout(() => {
|
||||
|
@ -52,6 +52,10 @@ const globby = require('globby')
|
||||
|
||||
module.exports = function (api) {
|
||||
|
||||
api.setClientOptions({
|
||||
cwd: process.cwd(),
|
||||
})
|
||||
|
||||
api.loadSource(({ addCollection }) => {
|
||||
const appCollection = addCollection({ typeName: 'Package' })
|
||||
|
||||
|
@ -214,6 +214,10 @@ export default {
|
||||
const { currentPath } = this
|
||||
const filePath = currentPath === '' ? '/introduction' : currentPath
|
||||
|
||||
if (process.env.NODE_ENV === 'development') {
|
||||
return `vscode://file${this.cwd}/src/docPages${filePath}.md`
|
||||
}
|
||||
|
||||
return `https://github.com/ueberdosis/tiptap-next/blob/main/docs/src/docPages${filePath}.md`
|
||||
},
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user