@tryghost/koenig-lexical 0.0.59 → 0.0.60
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/README.md +19 -3
- package/dist/koenig-lexical.js +45621 -45266
- package/dist/koenig-lexical.js.map +1 -1
- package/dist/koenig-lexical.umd.js +149 -149
- package/dist/koenig-lexical.umd.js.map +1 -1
- package/package.json +11 -10
package/README.md
CHANGED
|
@@ -4,8 +4,24 @@ Early stage re-write of Ghost's editor, using Lexical as the editor framework in
|
|
|
4
4
|
|
|
5
5
|
## Development
|
|
6
6
|
|
|
7
|
+
### Pre-requisites
|
|
8
|
+
|
|
9
|
+
This package makes use of two other built packages in the monorepo, those packages will need to be built before this package's build will succeed.
|
|
10
|
+
|
|
11
|
+
```
|
|
12
|
+
cd packages/kg-default-nodes && yarn build
|
|
13
|
+
cd ..
|
|
14
|
+
cd packages/kg-clean-basic-html && yarn build
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
_Note:_ If any changes are made to those packages you'll need to rebuild them before the changes will show up in the demo site.
|
|
18
|
+
|
|
19
|
+
### Running the development version
|
|
20
|
+
|
|
7
21
|
Run `yarn dev` to start the development server to test/develop the editor standalone. This will generate a demo site from the `index.html` file which renders the demo app in `demo/demo.jsx` and makes it available on http://localhost:5173
|
|
8
22
|
|
|
23
|
+
### Running inside Admin
|
|
24
|
+
|
|
9
25
|
To test/develop inside of Admin you can run `yarn preview` then in Ghost set your `editor.url` value in `config.local.json` to `http://127.0.0.1:4173/koenig-lexical.umd.js` and load Admin as usual.
|
|
10
26
|
|
|
11
27
|
```json
|
|
@@ -50,15 +66,15 @@ All imported files are processed/optimised via SVGO (see `svgo.config.js` for op
|
|
|
50
66
|
|
|
51
67
|
## Testing
|
|
52
68
|
|
|
53
|
-
Tests use [Vitest](https://vitest.dev) as the test runner, with [
|
|
69
|
+
Tests use [Vitest](https://vitest.dev) as the test runner, with [Playwright](https://playwright.dev) used for e2e testing.
|
|
54
70
|
|
|
55
|
-
- `yarn test
|
|
71
|
+
- `yarn test` runs tests and exits
|
|
56
72
|
- `yarn test:headed` runs tests in browser so you can watch the tests execute
|
|
57
73
|
- `yarn test:slowmo` same as `yarn test:headed` but adds 100ms delay between instructions to make it easier to see what's happening (note that some tests may fail or timeout due to the added delays)
|
|
58
74
|
- `yarn test:watch` runs tests and starts a test watcher that re-runs tests on file changes
|
|
59
75
|
- `yarn test:watch --ui` same as `yarn test:watch` but also opens a browser UI for exploring and re-running tests
|
|
60
76
|
|
|
61
|
-
Before tests are started we build a version of the demo app that is used for e2e tests.
|
|
77
|
+
Before tests are started we build a version of the demo app that is used for the e2e tests.
|
|
62
78
|
|
|
63
79
|
### Editor integration
|
|
64
80
|
|