@vuepress/plugin-shiki 2.0.0-beta.48 → 2.0.0-beta.50-pre

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vuepress/plugin-shiki",
3
- "version": "2.0.0-beta.48",
3
+ "version": "2.0.0-beta.50-pre",
4
4
  "description": "VuePress plugin - shiki",
5
5
  "keywords": [
6
6
  "vuepress-plugin",
@@ -19,13 +19,18 @@
19
19
  },
20
20
  "license": "MIT",
21
21
  "author": "meteorlxy",
22
- "main": "lib/node/index.js",
23
- "types": "lib/node/index.d.ts",
22
+ "type": "module",
23
+ "exports": {
24
+ ".": "./lib/node/index.js",
25
+ "./package.json": "./package.json"
26
+ },
27
+ "main": "./lib/node/index.js",
28
+ "types": "./lib/node/index.d.ts",
24
29
  "files": [
25
- "lib"
30
+ "./lib"
26
31
  ],
27
32
  "dependencies": {
28
- "@vuepress/core": "2.0.0-beta.48",
33
+ "@vuepress/core": "2.0.0-beta.50-pre",
29
34
  "shiki": "^0.10.1"
30
35
  },
31
36
  "publishConfig": {
@@ -1,3 +0,0 @@
1
- import { shikiPlugin } from './shikiPlugin';
2
- export * from './shikiPlugin';
3
- export default shikiPlugin;
package/lib/node/index.js DELETED
@@ -1,19 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- const shikiPlugin_1 = require("./shikiPlugin");
18
- __exportStar(require("./shikiPlugin"), exports);
19
- exports.default = shikiPlugin_1.shikiPlugin;
@@ -1,7 +0,0 @@
1
- import type { Plugin } from '@vuepress/core';
2
- import type { HighlighterOptions } from 'shiki';
3
- /**
4
- * Options of @vuepress/plugin-shiki
5
- */
6
- export declare type ShikiPluginOptions = Pick<HighlighterOptions, 'theme' | 'langs'>;
7
- export declare const shikiPlugin: ({ theme, langs, }?: ShikiPluginOptions) => Plugin;
@@ -1,15 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.shikiPlugin = void 0;
4
- const shiki_1 = require("shiki");
5
- const shikiPlugin = ({ theme = 'nord', langs = [], } = {}) => ({
6
- name: '@vuepress/plugin-shiki',
7
- extendsMarkdown: async (md) => {
8
- const highlighter = await (0, shiki_1.getHighlighter)({
9
- theme,
10
- langs,
11
- });
12
- md.options.highlight = (code, lang) => highlighter.codeToHtml(code, lang);
13
- },
14
- });
15
- exports.shikiPlugin = shikiPlugin;