Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(htmlparser2-adapter): Add CJS build #496

Merged
merged 1 commit into from Apr 12, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 1 addition & 2 deletions package.json
Expand Up @@ -25,9 +25,8 @@
"typescript": "^4.6.3"
},
"scripts": {
"build": "npm run build:esm && npm run build:cjs",
"build": "npm run build:esm && npm run build:cjs --workspaces --if-present",
"build:esm": "tsc --build packages/* test",
"build:cjs": "tsc -p packages/parse5/tsconfig.cjs.json && echo '{\"type\":\"commonjs\"}' > packages/parse5/dist/cjs/package.json",
"build:docs": "node --max-old-space-size=8192 node_modules/.bin/typedoc .",
"prettier": "prettier '**/*.{js,ts,md,json,yml}' --loglevel warn",
"format": "npm run format:es && npm run format:prettier",
Expand Down
10 changes: 8 additions & 2 deletions packages/parse5-htmlparser2-tree-adapter/package.json
Expand Up @@ -14,14 +14,20 @@
"htmlparser2"
],
"license": "MIT",
"main": "dist/index.js",
"main": "dist/cjs/index.js",
fb55 marked this conversation as resolved.
Show resolved Hide resolved
"module": "dist/index.js",
"types": "dist/index.d.ts",
"exports": "./dist/index.js",
"exports": {
"import": "./dist/index.js",
fb55 marked this conversation as resolved.
Show resolved Hide resolved
"require": "./dist/cjs/index.js"
},
"dependencies": {
"domhandler": "^4.3.1",
"parse5": "^6.0.1"
},
"scripts": {
"build:cjs": "tsc --module CommonJS --target ES6 --outDir dist/cjs && echo '{\"type\":\"commonjs\"}' > dist/cjs/package.json"
},
"repository": {
"type": "git",
"url": "git://github.com/inikulin/parse5.git"
Expand Down
9 changes: 5 additions & 4 deletions packages/parse5/package.json
Expand Up @@ -32,10 +32,11 @@
"module": "dist/index.js",
"types": "dist/index.d.ts",
"exports": {
".": {
"import": "./dist/index.js",
"require": "./dist/cjs/index.js"
}
"import": "./dist/index.js",
"require": "./dist/cjs/index.js"
},
"scripts": {
"build:cjs": "tsc --module CommonJS --target ES6 --outDir dist/cjs && echo '{\"type\":\"commonjs\"}' > dist/cjs/package.json"
},
"repository": {
"type": "git",
Expand Down
8 changes: 0 additions & 8 deletions packages/parse5/tsconfig.cjs.json

This file was deleted.