• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1{
2    "name": "parse5-build-scripts",
3    "private": true,
4    "type": "module",
5    "workspaces": [
6        "packages/*",
7        "bench",
8        "test"
9    ],
10    "devDependencies": {
11        "@types/jest": "^29.2.3",
12        "@typescript-eslint/eslint-plugin": "^5.43.0",
13        "@typescript-eslint/parser": "^5.43.0",
14        "eslint": "^8.27.0",
15        "eslint-config-prettier": "^8.5.0",
16        "eslint-plugin-unicorn": "^44.0.2",
17        "husky": "^8.0.2",
18        "jest": "^29.3.1",
19        "lint-staged": "^13.0.3",
20        "outdent": "^0.8.0",
21        "prettier": "^2.7.1",
22        "ts-jest": "^29.0.3",
23        "ts-node": "^10.9.1",
24        "typedoc": "^0.23.21",
25        "typescript": "^4.9.3"
26    },
27    "scripts": {
28        "build": "npm run build:esm && npm run build:cjs --workspaces --if-present",
29        "build:esm": "tsc --build packages/* test",
30        "build:docs": "node --max-old-space-size=8192 node_modules/.bin/typedoc .",
31        "prettier": "prettier '**/*.{js,ts,md,json,yml}' --loglevel warn",
32        "format": "npm run format:es && npm run format:prettier",
33        "format:es": "npm run lint:es -- --fix",
34        "format:prettier": "npm run prettier -- --write",
35        "lint": "npm run lint:es && npm run lint:prettier",
36        "lint:es": "eslint .",
37        "lint:prettier": "npm run prettier -- --check",
38        "unit-tests": "NODE_OPTIONS=--experimental-vm-modules jest",
39        "test": "npm run lint && npm run unit-tests",
40        "generate-feedback-tests": "node --loader ts-node/esm scripts/generate-parser-feedback-test/index.ts test/data/html5lib-tests/tree-construction/*.dat",
41        "bench-perf": "npm run build && node bench/perf/index.js",
42        "bench-memory-sax": "npm run build && node bench/memory/sax-parser.js",
43        "preversion": "npm test",
44        "pre-commit": "lint-staged",
45        "publish": "npm publish --workspaces",
46        "prepare": "husky install",
47        "prepublish": "npm run build"
48    },
49    "lint-staged": {
50        "*.{js,ts}": [
51            "prettier --write",
52            "eslint --fix"
53        ],
54        "*.{md,json,yml}": [
55            "prettier --write"
56        ]
57    },
58    "jest": {
59        "preset": "ts-jest/presets/default-esm",
60        "testEnvironment": "node",
61        "coverageProvider": "v8",
62        "globals": {
63            "ts-jest": {
64                "useESM": true
65            }
66        },
67        "moduleNameMapper": {
68            "^(parse5[^/]*)/dist/(.*?)(?:\\.js)?$": "<rootDir>/packages/$1/lib/$2",
69            "^(parse5[^/]*)$": "<rootDir>/packages/$1/lib/index.ts",
70            "^(.*)\\.js$": [
71                "$1",
72                "$1.js"
73            ]
74        },
75        "coveragePathIgnorePatterns": [
76            "node_modules",
77            "bench",
78            "test"
79        ]
80    }
81}
82