prosemirror-highlight 0.0.1 → 0.1.0

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.
Files changed (2) hide show
  1. package/README.md +6 -1
  2. package/package.json +45 -28
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  [![NPM version](https://img.shields.io/npm/v/prosemirror-highlight?color=a1b858&label=)](https://www.npmjs.com/package/prosemirror-highlight)
4
4
 
5
- Highlight your code blocks in ProseMirror, with any syntax highlighter you want.
5
+ Highlight your code blocks in [ProseMirror], with any syntax highlighter you want.
6
6
 
7
7
  ## Usage
8
8
 
@@ -39,6 +39,10 @@ const parser = createParser(lowlight)
39
39
  export const lowlightPlugin = createHighlightPlugin({ parser })
40
40
  ```
41
41
 
42
+ ## Online demo
43
+
44
+ [![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/ocavue/prosemirror-highlight?file=playground%2Fmain.ts)
45
+
42
46
  ## Credits
43
47
 
44
48
  - [prosemirror-highlightjs] - Highlight.js syntax highlighting for ProseMirror
@@ -47,6 +51,7 @@ export const lowlightPlugin = createHighlightPlugin({ parser })
47
51
 
48
52
  MIT
49
53
 
54
+ [ProseMirror]: https://prosemirror.net
50
55
  [prosemirror-highlightjs]: https://github.com/b-kelly/prosemirror-highlightjs
51
56
  [lowlight]: https://github.com/wooorm/lowlight
52
57
  [Highlight.js]: https://github.com/highlightjs/highlight.js
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "prosemirror-highlight",
3
3
  "type": "module",
4
- "version": "0.0.1",
4
+ "version": "0.1.0",
5
5
  "packageManager": "pnpm@8.10.0",
6
6
  "description": "A ProseMirror plugin to highlight code blocks",
7
7
  "author": "ocavue <ocavue@gmail.com>",
@@ -15,26 +15,33 @@
15
15
  "bugs": "https://github.com/ocavue/prosemirror-highlight/issues",
16
16
  "keywords": [],
17
17
  "sideEffects": false,
18
- "main": "./dist/index.js",
19
- "module": "./dist/index.js",
20
- "types": "./dist/index.d.ts",
18
+ "main": "./src/index.ts",
19
+ "module": "./src/index.ts",
20
+ "types": "./src/index.ts",
21
21
  "exports": {
22
22
  ".": {
23
- "types": "./dist/index.d.ts",
24
- "default": "./dist/index.js"
23
+ "default": "./src/index.ts"
25
24
  },
26
25
  "./lowlight": {
27
- "types": "./dist/lowlight.d.ts",
28
- "default": "./dist/lowlight.js"
26
+ "default": "./src/lowlight.ts"
29
27
  },
30
28
  "./shiki": {
31
- "types": "./dist/shiki.d.ts",
32
- "default": "./dist/shiki.js"
29
+ "default": "./src/shiki.ts"
33
30
  }
34
31
  },
35
32
  "files": [
36
33
  "dist"
37
34
  ],
35
+ "scripts": {
36
+ "dev": "vite",
37
+ "build": "tsup",
38
+ "lint": "eslint .",
39
+ "fix": "eslint --fix . && prettier --write .",
40
+ "prepublishOnly": "nr build",
41
+ "start": "esno src/index.ts",
42
+ "test": "vitest",
43
+ "typecheck": "tsc --noEmit"
44
+ },
38
45
  "peerDependencies": {
39
46
  "@types/hast": "^3.0.0",
40
47
  "highlight.js": "^11.9.0",
@@ -85,26 +92,36 @@
85
92
  "vite": "^4.5.0",
86
93
  "vitest": "^1.0.3"
87
94
  },
95
+ "publishConfig": {
96
+ "main": "./dist/index.js",
97
+ "module": "./dist/index.js",
98
+ "types": "./dist/index.d.ts",
99
+ "exports": {
100
+ ".": {
101
+ "types": "./dist/index.d.ts",
102
+ "default": "./dist/index.js"
103
+ },
104
+ "./lowlight": {
105
+ "types": "./dist/lowlight.d.ts",
106
+ "default": "./dist/lowlight.js"
107
+ },
108
+ "./shiki": {
109
+ "types": "./dist/shiki.d.ts",
110
+ "default": "./dist/shiki.js"
111
+ }
112
+ },
113
+ "typesVersions": {
114
+ "*": {
115
+ "*": [
116
+ "./dist/*",
117
+ "./dist/index.d.ts"
118
+ ]
119
+ }
120
+ }
121
+ },
88
122
  "renovate": {
89
123
  "extends": [
90
124
  "github>ocavue/config-renovate"
91
125
  ]
92
- },
93
- "scripts": {
94
- "dev": "vite",
95
- "build": "tsup",
96
- "lint": "eslint .",
97
- "fix": "eslint --fix . && prettier --write .",
98
- "start": "esno src/index.ts",
99
- "test": "vitest",
100
- "typecheck": "tsc --noEmit"
101
- },
102
- "typesVersions": {
103
- "*": {
104
- "*": [
105
- "./dist/*",
106
- "./dist/index.d.ts"
107
- ]
108
- }
109
126
  }
110
- }
127
+ }