UNPKG

legal-markdown-js

Version:

Node.js implementation of LegalMarkdown for processing legal documents with markdown and YAML - Complete feature parity with Ruby version

196 lines (195 loc) 7.8 kB
{ "name": "legal-markdown-js", "version": "3.1.7", "description": "Node.js implementation of LegalMarkdown for processing legal documents with markdown and YAML - Complete feature parity with Ruby version", "type": "module", "main": "./dist/index.cjs", "module": "./dist/index.js", "types": "./dist/index.d.ts", "exports": { ".": { "types": "./dist/index.d.ts", "import": "./dist/index.js", "require": "./dist/index.cjs" }, "./package.json": "./package.json" }, "scripts": { "build:assets": "mkdir -p dist/assets && cp -r $(node scripts/build-paths.js images)/* dist/assets/ 2>/dev/null || true", "build:examples": "mkdir -p dist/examples && cp -r examples/* dist/examples/ 2>/dev/null || true", "build:cjs": "tsc --project tsconfig.cjs.json && tsc-alias --project tsconfig.cjs.json", "build:copy-umd": "cp dist/legal-markdown.umd.min.js dist/web/ 2>/dev/null || true && cp dist/legal-markdown-browser.js dist/web/ 2>/dev/null || true", "build:esm": "tsc --project tsconfig.esm.json && tsc-alias --project tsconfig.esm.json && node scripts/fix-esm-imports.js", "build:fix-extensions": "node scripts/fix-build-extensions.js", "build:packages": "node scripts/build-packages.cjs", "build:restore-cli": "tsc --project tsconfig.esm.json && node scripts/fix-esm-imports.js", "build:styles": "mkdir -p dist/styles && cp -r $(node scripts/build-paths.js styles)/* dist/styles/ 2>/dev/null || true", "build:ts": "npm run build:esm && npm run build:cjs && npm run build:fix-extensions && npm run build:restore-cli", "build:umd": "webpack --mode production --config webpack.config.cjs", "build:vite": "vite build", "build:watch": "tsc --watch", "build:web": "node scripts/build-web.js", "build": "npm run build:ts && npm run build:styles && npm run build:assets && npm run build:examples && npm run build:vite && npm run build:web && npm run build:umd && npm run build:copy-umd", "clean": "rm -rf dist coverage .turbo && tsc --build --clean", "cli:ui": "node --loader ts-node/esm --loader tsconfig-paths/register src/cli/interactive/index.ts", "cli": "ts-node -r tsconfig-paths/register src/cli/index.ts", "commit": "cz", "dev": "ts-node-dev -r tsconfig-paths/register --respawn src/cli/index.ts", "docs": "typedoc src --out docs/api", "format:check": "prettier --check \"src/**/*.ts\"", "format": "prettier --write \"src/**/*.ts\"", "lint:fix": "eslint src/**/*.ts --fix", "lint": "eslint src/**/*.ts", "prepare": "husky", "postinstall": "node scripts/postinstall.cjs || true", "prepublishOnly": "npm run build", "prerelease": "npm run clean && npm run build && npm run test", "release:dry": "semantic-release --dry-run", "setup-config": "node scripts/setup-config.cjs", "test:changed-since": "vitest --changed HEAD~1", "test:changed": "vitest --changed", "test:ci": "vitest run --reporter=json --reporter=default", "test:core": "vitest run tests/unit/core", "test:coverage": "vitest run --coverage", "test:e2e:all": "npm run test:e2e:ticket && npm run test:e2e:contract", "test:e2e:contract": "node scripts/visual-tests/generate-contract.cjs", "test:e2e:ticket": "node scripts/visual-tests/generate-ticket.cjs", "test:e2e": "E2E_TESTS=1 vitest run tests/e2e", "test:fast": "vitest --changed", "test:integration": "vitest run tests/integration", "test:plugins": "vitest run tests/unit/plugins", "test:related": "vitest --related", "test:staged": "bash -c 'FILES=$(git diff --cached --name-only --diff-filter=ACMR | grep -E \"\\.(ts|js)$\" | head -20); if [ -n \"$FILES\" ]; then vitest run --exclude \"**/e2e/**\" --bail=1; else echo \"No staged TypeScript/JavaScript files to test\"; fi'", "test:unit": "vitest run tests/unit", "test:watch": "vitest --watch", "test": "vitest", "test:ui": "vitest --ui", "test:run": "vitest run", "test:unit:fast": "vitest run tests/unit --exclude '**/integration/**' --exclude '**/e2e/**'", "test:slow": "vitest run tests/integration && E2E_TESTS=1 vitest run tests/e2e", "test:pdf-setup": "node scripts/test-pdf-setup.cjs", "typecheck": "tsc --noEmit", "validate": "npm run typecheck && npm run lint && npm run test && npm run build", "web:serve": "node scripts/web-serve.cjs", "web": "node scripts/web-serve.cjs" }, "keywords": [ "legal", "markdown", "document", "contract", "yaml", "parser", "legal-markdown", "typescript", "nodejs", "legal-tech" ], "author": "@petalo", "license": "MIT", "repository": { "type": "git", "url": "https://github.com/petalo/legal-markdown-js.git" }, "bugs": { "url": "https://github.com/petalo/legal-markdown-js/issues" }, "homepage": "https://github.com/petalo/legal-markdown-js#readme", "jsdelivr": "dist/legal-markdown.umd.min.js", "unpkg": "dist/legal-markdown.umd.min.js", "dependencies": { "@inquirer/prompts": "^7.7.1", "@puppeteer/browsers": "^2.4.1", "@types/js-beautify": "^1.14.3", "chalk": "^4.1.2", "cheerio": "^1.1.0", "commander": "^11.1.0", "dotenv": "^17.2.1", "js-beautify": "^1.15.4", "js-yaml": "^4.1.0", "latex-ast-parser": "^1.1.0", "marked": "^15.0.12", "mdast-util-to-string": "^4.0.0", "puppeteer": "^24.13.0", "remark": "^15.0.1", "remark-html": "^16.0.1", "remark-parse": "^11.0.0", "remark-stringify": "^11.0.0", "restructured": "^0.0.11", "tsx": "^4.20.3", "unified": "^11.0.5", "unist-util-is": "^6.0.0", "unist-util-visit": "^5.0.0", "unist-util-visit-parents": "^6.0.1" }, "devDependencies": { "@commitlint/cli": "^19.8.1", "@commitlint/config-conventional": "^19.8.1", "@semantic-release/changelog": "^6.0.3", "@semantic-release/git": "^10.0.1", "@types/cheerio": "^0.22.35", "@types/eslint": "^9.6.1", "@types/js-yaml": "^4.0.8", "@types/marked": "^5.0.2", "@types/node": "^20.8.9", "@types/unist": "^3.0.3", "@typescript-eslint/eslint-plugin": "^7.18.0", "@typescript-eslint/parser": "^7.18.0", "@vitejs/plugin-legacy": "^7.1.0", "@vitest/coverage-v8": "^3.2.4", "@vitest/ui": "^3.2.4", "browserify": "^17.0.0", "buffer": "^6.0.3", "commitizen": "^4.3.1", "crypto-browserify": "^3.12.1", "cz-conventional-changelog": "^3.3.0", "eslint": "^8.52.0", "eslint-config-prettier": "^10.1.8", "events": "^3.3.0", "glob": "^11.0.3", "husky": "^9.1.7", "lint-staged": "^16.1.2", "path-browserify": "^1.0.1", "prettier": "^3.0.3", "semantic-release": "^24.2.5", "stream-browserify": "^3.0.0", "ts-loader": "^9.4.4", "ts-node": "^10.9.1", "tsc-alias": "^1.8.16", "tsconfig-paths": "^4.2.0", "typedoc": "^0.28.7", "typescript": "^5.2.2", "util": "^0.12.5", "vite": "^7.0.6", "vitest": "^3.2.4", "webpack": "^5.88.0", "webpack-cli": "^5.1.4" }, "bin": { "legal-md": "./dist/cli/index.js", "legal-md-ui": "./dist/cli/interactive/index.js", "legal-md-setup": "./scripts/setup-config.cjs", "legal-md-playground": "./scripts/web-serve.cjs" }, "files": ["dist", "scripts", "README.md", "LICENSE"], "engines": { "node": ">=18.0.0" }, "lint-staged": { "src/**/*.{ts,tsx}": ["prettier --write", "eslint --fix", "npm run test:staged"], "*.{md,json,yaml,yml}": ["prettier --write"] }, "config": { "commitizen": { "path": "cz-conventional-changelog" } }, "optionalDependencies": { "pandoc-wasm": "^0.0.2" }, "puppeteer": { "skipDownload": false, "skipChromiumDownload": false, "cacheDirectory": "~/.cache/puppeteer-global" } }