Build and test scripts for ProseMirror packages
  • JavaScript 100%
Find a file
2026-04-01 22:03:18 +02:00
bin Support a --type-check flag 2025-11-09 21:10:05 +01:00
.gitignore Initial commit 2022-05-20 14:22:35 +02:00
.npmignore Initial commit 2022-05-20 14:22:35 +02:00
LICENSE Update maintainer email 2023-01-24 08:43:12 +01:00
package.json Update links to github 2026-04-01 22:03:18 +02:00
README.md Support a --type-check flag 2025-11-09 21:10:05 +01:00

Helper scripts to build and test ProseMirror packages.

The scripts (pm-buildhelper and pm-runtests) in this package build and test packages that conform to the conventions of the various ProseMirror packages.

pm-buildhelper takes the package's main file as argument and does the following:

  • Mangle the code to convert our /// doc comments to /** */ comments, so that TypeScript will not strip them.

  • Run the TypeScript compiler, catching the output in memory.

  • Fails the build on TypeScript errors with the --type-check flag.

  • Run rollup and rollup-plugin-dts on the result to emit the CommonJS and ES modules, as well as a bundled .d.ts file, to dist/.

The pm-runtests scipt helps run tests. Given a list of directories, it'll run ./test/test-*.js as plain mocha tests, and ./test/webtest-*.js using a Selenium headless browser.

You can also pass it a --server argument to start a test server that you can interact with in your browser.