Skip to content

Commit

Permalink
feat: add re-export of codemirror core modules (#266)
Browse files Browse the repository at this point in the history
Added submodule `@gravity-ui/markdown-editor/cm/*` with re-export of core codemirror modules
  • Loading branch information
d3m1d0v authored Jun 6, 2024
1 parent 47f6b79 commit 9ccf3b1
Show file tree
Hide file tree
Showing 8 changed files with 34 additions and 0 deletions.
8 changes: 8 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,11 @@
"require": "./build/cjs/bundle/*",
"import": "./build/esm/bundle/*"
},
"./cm/*": {
"types": "./build/esm/cm/*",
"require": "./build/cjs/cm/*",
"import": "./build/esm/cm/*"
},
"./pm/*": {
"types": "./build/esm/pm/*",
"require": "./build/cjs/pm/*",
Expand Down Expand Up @@ -109,6 +114,9 @@
"specs": [
"./build/esm/extensions/specs.d.ts"
],
"cm/*": [
"./build/esm/cm/*"
],
"pm/*": [
"./build/esm/pm/*"
],
Expand Down
1 change: 1 addition & 0 deletions src/cm/autocomplete.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from '@codemirror/autocomplete';
1 change: 1 addition & 0 deletions src/cm/commands.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from '@codemirror/commands';
1 change: 1 addition & 0 deletions src/cm/language.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from '@codemirror/language';
15 changes: 15 additions & 0 deletions src/cm/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
## CM submodule

### Re-exports codemirror core modules:

- [@codemirror/autocomplete](https://github.com/codemirror/autocomplete)
- [@codemirror/commands](https://github.com/codemirror/commands)
- [@codemirror/language](https://github.com/codemirror/language)
- [@codemirror/state](https://github.com/codemirror/state)
- [@codemirror/view](https://github.com/codemirror/view)

### Usage

```js
import {EditorView} from '@gravity-ui/markdown-editor/cm/view';
```
1 change: 1 addition & 0 deletions src/cm/state.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from '@codemirror/state';
1 change: 1 addition & 0 deletions src/cm/view.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from '@codemirror/view';
6 changes: 6 additions & 0 deletions src/pm/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,9 @@

- [prosemirror-utils](https://github.com/atlassian/prosemirror-utils)
- [prosemirror-test-builder](https://github.com/ProseMirror/prosemirror-test-builder)

### Usage

```js
import {EditorView} from '@gravity-ui/markdown-editor/pm/view';
```

0 comments on commit 9ccf3b1

Please sign in to comment.