mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2025-01-30 12:52:43 +08:00
refactor(highlightjs): update version to 10
This commit is contained in:
parent
a99101d35b
commit
99f9f15aff
@ -11,7 +11,7 @@ The following code shows how to set hljs of Naive UI. Importing highlight.js on
|
||||
```js
|
||||
// ...
|
||||
import naive from 'naive-ui'
|
||||
import hljs from 'highlight.js/lib/highlight'
|
||||
import hljs from 'highlight.js/lib/core'
|
||||
import cpp from 'highlight.js/lib/languages/cpp'
|
||||
|
||||
hljs.registerLanguage('cpp', cpp)
|
||||
|
@ -11,7 +11,7 @@
|
||||
```js
|
||||
// ...
|
||||
import naive from 'naive-ui'
|
||||
import hljs from 'highlight.js/lib/highlight'
|
||||
import hljs from 'highlight.js/lib/core'
|
||||
import cpp from 'highlight.js/lib/languages/cpp'
|
||||
|
||||
hljs.registerLanguage('cpp', cpp)
|
||||
|
@ -1,4 +1,4 @@
|
||||
import hljs from 'highlight.js/lib/highlight'
|
||||
import hljs from 'highlight.js/lib/core'
|
||||
import javascript from 'highlight.js/lib/languages/javascript'
|
||||
import python from 'highlight.js/lib/languages/python'
|
||||
import cpp from 'highlight.js/lib/languages/cpp'
|
||||
|
@ -1,13 +0,0 @@
|
||||
<template>
|
||||
<svg
|
||||
viewBox="0 0 40 40"
|
||||
>
|
||||
<title>BackTop</title>
|
||||
<g>
|
||||
<path
|
||||
d="M30,8A20,20,0,1,0,50,28,20,20,0,0,0,30,8Zm8,23.8a1.65,1.65,0,0,1-2.36,0l-4-3.94V36.4a1.67,1.67,0,0,1-3.34,0V28l-4,3.76a1.65,1.65,0,0,1-2.36,0,1.48,1.48,0,0,1,0-2.25l7-6.67a1.65,1.65,0,0,1,2.36,0L38,29.45A1.59,1.59,0,0,1,38,31.8Zm2.36-10.61H19.67a1.6,1.6,0,1,1,0-3.19H40.33a1.6,1.6,0,1,1,0,3.19Z"
|
||||
transform="translate(-10 -8)"
|
||||
/>
|
||||
</g>
|
||||
</svg>
|
||||
</template>
|
@ -1,5 +1,6 @@
|
||||
const path = require('path')
|
||||
const alias = require('@rollup/plugin-alias')
|
||||
const { babel } = require('@rollup/plugin-babel')
|
||||
const rollupCssRenderPlugin = require('./build/rollup-plugin-css-render')
|
||||
const rollupDemoPlugin = require('./build/rollup-plugin-demo')
|
||||
const viteCssRenderPlugin = require('./build/vite-plugin-css-render')
|
||||
@ -14,8 +15,8 @@ module.exports = {
|
||||
outDir: 'site',
|
||||
optimizeDeps: {
|
||||
include: [
|
||||
'highlight.js/lib/core',
|
||||
'highlight.js/lib/languages/cpp',
|
||||
'highlight.js/lib/highlight',
|
||||
'highlight.js/lib/languages/javascript',
|
||||
'highlight.js/lib/languages/python',
|
||||
'vooks'
|
||||
@ -43,7 +44,10 @@ module.exports = {
|
||||
]
|
||||
}),
|
||||
rollupDemoPlugin(),
|
||||
rollupCssRenderPlugin()
|
||||
rollupCssRenderPlugin(),
|
||||
babel({
|
||||
babelHelpers: 'bundled'
|
||||
})
|
||||
]
|
||||
},
|
||||
indexHtmlTransforms: [
|
||||
|
Loading…
Reference in New Issue
Block a user