2020-03-05 16:18:17 +08:00
|
|
|
import Prism from 'prismjs'
|
2020-03-27 20:46:10 +08:00
|
|
|
import 'prismjs/themes/prism-coy.css'
|
2020-04-17 03:12:31 +08:00
|
|
|
import 'prismjs/components/prism-jsx.js'
|
2020-04-17 23:06:55 +08:00
|
|
|
import App from '~/layouts/App'
|
2020-03-27 20:21:59 +08:00
|
|
|
import Demo from '~/components/Demo'
|
2020-04-01 01:26:34 +08:00
|
|
|
import Tab from '~/components/Tab'
|
2020-04-17 18:51:49 +08:00
|
|
|
import ReactRenderer from '~/components/ReactRenderer'
|
2019-12-08 04:02:22 +08:00
|
|
|
|
|
|
|
export default function (Vue, { router, head, isClient }) {
|
2020-04-17 23:06:55 +08:00
|
|
|
Vue.component('Layout', App)
|
2020-03-05 16:18:17 +08:00
|
|
|
Vue.component('Demo', Demo)
|
2020-04-01 01:26:34 +08:00
|
|
|
Vue.component('Tab', Tab)
|
2020-04-17 18:51:49 +08:00
|
|
|
Vue.component('ReactRenderer', ReactRenderer)
|
2019-12-08 04:02:22 +08:00
|
|
|
Vue.filter('highlight', (code, lang = 'javascript') => {
|
|
|
|
return Prism.highlight(code, Prism.languages[lang], lang)
|
|
|
|
})
|
|
|
|
}
|