@vuepress/plugin-shiki 2.0.0-beta.5 → 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 +16 -12
- package/CHANGELOG.md +0 -11
- package/lib/index.d.ts +0 -8
- package/lib/index.js +0 -16
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vuepress/plugin-shiki",
|
|
3
|
-
"version": "2.0.0-beta.
|
|
3
|
+
"version": "2.0.0-beta.50-pre",
|
|
4
4
|
"description": "VuePress plugin - shiki",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"vuepress-plugin",
|
|
@@ -19,21 +19,25 @@
|
|
|
19
19
|
},
|
|
20
20
|
"license": "MIT",
|
|
21
21
|
"author": "meteorlxy",
|
|
22
|
-
"
|
|
23
|
-
"
|
|
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
|
-
"scripts": {
|
|
28
|
-
"build": "tsc -b tsconfig.build.json",
|
|
29
|
-
"clean": "rimraf lib *.tsbuildinfo"
|
|
30
|
-
},
|
|
31
32
|
"dependencies": {
|
|
32
|
-
"@vuepress/core": "2.0.0-beta.
|
|
33
|
-
"shiki": "^0.
|
|
33
|
+
"@vuepress/core": "2.0.0-beta.50-pre",
|
|
34
|
+
"shiki": "^0.10.1"
|
|
34
35
|
},
|
|
35
36
|
"publishConfig": {
|
|
36
37
|
"access": "public"
|
|
37
38
|
},
|
|
38
|
-
"
|
|
39
|
-
|
|
39
|
+
"scripts": {
|
|
40
|
+
"build": "tsc -b tsconfig.build.json",
|
|
41
|
+
"clean": "rimraf lib *.tsbuildinfo"
|
|
42
|
+
}
|
|
43
|
+
}
|
package/CHANGELOG.md
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
# Change Log
|
|
2
|
-
|
|
3
|
-
All notable changes to this project will be documented in this file.
|
|
4
|
-
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
|
-
|
|
6
|
-
# [2.0.0-beta.5](https://github.com/vuepress/vuepress-next/compare/v2.0.0-beta.4...v2.0.0-beta.5) (2021-03-26)
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
### Features
|
|
10
|
-
|
|
11
|
-
* **plugin-shiki:** add shiki plugin ([66bbcbd](https://github.com/vuepress/vuepress-next/commit/66bbcbde497cca525fc585b4046b11784e8d61bc))
|
package/lib/index.d.ts
DELETED
|
@@ -1,8 +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: Plugin<ShikiPluginOptions>;
|
|
8
|
-
export default shikiPlugin;
|
package/lib/index.js
DELETED
|
@@ -1,16 +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
|
-
async extendsMarkdown(md) {
|
|
8
|
-
const highlighter = await shiki_1.getHighlighter({
|
|
9
|
-
theme,
|
|
10
|
-
langs,
|
|
11
|
-
});
|
|
12
|
-
md.options.highlight = (code, lang) => highlighter.codeToHtml(code, lang);
|
|
13
|
-
},
|
|
14
|
-
});
|
|
15
|
-
exports.shikiPlugin = shikiPlugin;
|
|
16
|
-
exports.default = exports.shikiPlugin;
|