Compare commits

...

2 Commits
main ... cjs

Author SHA1 Message Date
Scott Nonnenberg
06e8641028 Prepare for publish as @signalapp/parchment-cjs 2025-01-21 16:01:30 -10:00
Scott Nonnenberg
320f0f207f First move towards CJS 2025-01-11 08:25:16 +10:00
5 changed files with 20 additions and 17 deletions

1
.gitignore vendored
View File

@ -1,5 +1,6 @@
/.build
/dist
/dist-node
/node_modules
*.log

View File

@ -1,3 +1,9 @@
## Note: This fork is for use in Signal Desktop.
It has just one change: moving from ESM to CJS
It's published as `@signalapp/parchment-cjs`.
# Parchment [![Build Status](https://github.com/quilljs/parchment/actions/workflows/main.yml/badge.svg?branch=main)](https://github.com/quilljs/parchment/actions?query=branch%3Amain)
Parchment is [Quill](https://quilljs.com)'s document model. It is a parallel tree structure to the DOM tree, and provides functionality useful for content editors, like Quill. A Parchment tree is made up of [Blots](#blots), which mirror a DOM node counterpart. Blots can provide structure, formatting, and/or content. [Attributors](#attributors) can also provide lightweight formatting information.

View File

@ -3,7 +3,7 @@
*/
{
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
"mainEntryPointFilePath": "dist/typings/src/parchment.d.ts",
"mainEntryPointFilePath": "dist-node/src/parchment.d.ts",
"dtsRollup": {
"enabled": true,
"untrimmedFilePath": "<projectFolder>/dist/parchment.d.ts"

View File

@ -1,16 +1,13 @@
{
"name": "parchment",
"version": "3.0.0",
"name": "@signalapp/parchment-cjs",
"version": "3.0.1",
"description": "A document model for rich text editors",
"author": "Jason Chen <jhchen7@gmail.com>",
"homepage": "http://quilljs.com/docs/parchment",
"main": "./dist/parchment.js",
"types": "./dist/parchment.d.ts",
"type": "module",
"main": "./src/parchment.js",
"types": "./src/parchment.d.ts",
"sideEffects": false,
"files": [
"tsconfig.json",
"dist",
"src"
],
"devDependencies": {
@ -38,11 +35,11 @@
"license": "BSD-3-Clause",
"repository": "github:quilljs/parchment",
"scripts": {
"build": "npm run build:bundle && npm run build:types",
"clean": "del-cli dist dist-node src/**/*.js src/**/*.d.ts tests/**/*.js tests/**/*.d.ts",
"build": "npm run clean && npm run build:bundle && npm run build:types",
"build:bundle": "vite build",
"build:types": "tsc --emitDeclarationOnly && api-extractor run && del-cli dist/typings",
"build:types": "tsc --declaration && api-extractor run && cp package.json dist-node/ && cp LICENSE dist-node/ && cp README.md dist-node/ && del-cli dist-node/tests",
"lint": "eslint 'src/**/*.ts' 'tests/**/*.ts'",
"prepare": "npm run build",
"test": "npm run test:unit",
"test:unit": "vitest --typecheck",
"test:pkg": "attw $(npm pack)"

View File

@ -1,16 +1,15 @@
{
"compilerOptions": {
"module": "es6",
"target": "es6",
"target": "ES2021",
"lib": ["es2015", "dom", "dom.iterable"],
"outDir": "./dist/esm",
"declaration": true,
"declarationDir": "./dist/typings",
"outDir": "./dist-node",
"strict": true,
"moduleResolution": "Bundler",
"module": "CommonJS",
"moduleResolution": "node",
"noUnusedLocals": true,
"noUnusedParameters": true,
"verbatimModuleSyntax": true
"skipLibCheck": true
},
"include": ["src", "tests"]
}