Skip to content

Commit

Permalink
chore(highlighter-helper): tweaks exports
Browse files Browse the repository at this point in the history
  • Loading branch information
Mister-Hope committed Dec 6, 2024
1 parent c806fb8 commit 90628e4
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ export const prepareClientConfigFile = (
if (collapsedLines !== 'disable') {
imports.push(
`import "${getRealPath('@vuepress/highlighter-helper/styles/collapsed-lines.css', url)}"`,
`import { setupCollapsedLines } from "${getRealPath('@vuepress/highlighter-helper/composables/collapsedLines.js', url)}"`,
`import { setupCollapsedLines } from "${getRealPath('@vuepress/highlighter-helper/client', url)}"`,
)
setups.push('setupCollapsedLines()')
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export const prepareClientConfigFile = (
if (collapsedLines !== 'disable') {
imports.push(
`import "${getRealPath('@vuepress/highlighter-helper/styles/collapsed-lines.css', url)}"`,
`import { setupCollapsedLines } from "${getRealPath('@vuepress/highlighter-helper/composables/collapsedLines.js', url)}"`,
`import { setupCollapsedLines } from "${getRealPath('@vuepress/highlighter-helper/client', url)}"`,
)
setups.push('setupCollapsedLines()')
}
Expand Down
2 changes: 1 addition & 1 deletion tools/highlighter-helper/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"type": "module",
"exports": {
".": "./lib/node/index.js",
"./composables/*": "./lib/client/composables/*",
"./client": "./lib/client/index.js",
"./styles/*": "./lib/client/styles/*",
"./package.json": "./package.json"
},
Expand Down
8 changes: 1 addition & 7 deletions tools/highlighter-helper/rollup.config.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
import { rollupBundle } from '../../scripts/rollup.js'

export default [
...rollupBundle('node/index'),
...rollupBundle({
base: 'client',
files: ['composables/collapsedLines'],
}),
]
export default [...rollupBundle('node/index'), ...rollupBundle('client/index')]
1 change: 1 addition & 0 deletions tools/highlighter-helper/src/client/composables/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './setupCollapsedLines.js'
1 change: 1 addition & 0 deletions tools/highlighter-helper/src/client/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './composables/index.js'

0 comments on commit 90628e4

Please sign in to comment.