Skip to content

Commit

Permalink
fix: expose createCssVariablesTheme in shiki/core to avoid side-e…
Browse files Browse the repository at this point in the history
…ffects
  • Loading branch information
antfu committed Jun 28, 2024
1 parent f2b3956 commit abe639d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion docs/guide/theme-colors.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,8 @@ Shiki provides a factory function helper `createCssVariablesTheme` for creating
This theme is **not included by default** and must be registered explicitly:

```ts twoslash
import { createCssVariablesTheme, createHighlighter } from 'shiki'
import { createCssVariablesTheme } from 'shiki/core'
import { createHighlighter } from 'shiki'

// Create a custom CSS variables theme, the following are the default values
const myTheme = createCssVariablesTheme({ // [!code hl:6]
Expand Down
3 changes: 3 additions & 0 deletions packages/shiki/src/core.ts
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
export * from '@shikijs/core'

export type { CssVariablesThemeOptions } from './theme-css-variables'
export { createCssVariablesTheme } from './theme-css-variables'
3 changes: 0 additions & 3 deletions packages/shiki/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
export * from './bundle-full'
export type { BuiltinLanguage, BuiltinTheme } from './types'

export type { CssVariablesThemeOptions } from './theme-css-variables'
export { createCssVariablesTheme } from './theme-css-variables'

0 comments on commit abe639d

Please sign in to comment.