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

refactor(build): support cjs and esm #87

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
refactor(build): support cjs and esm
bluelovers committed Jun 2, 2022
commit 4b48e027f44f69700fa4eed01667a8b0926b22c4
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -19,3 +19,4 @@ npm-debug.log
coverage/

deep-eql.js
/dist/
34 changes: 30 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -14,18 +14,42 @@
"dougluce (https://github.com/dougluce)",
"Lorenz Leutgeb (https://github.com/flowlo)"
],
"main": "./index",
"sideEffects": false,
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.esm.mjs",
"require": "./dist/index.cjs"
},
"./package.json": "./package.json",
"./src/*": "./src/*",
"./deep-eql.js": "./dist/index.umd.production.min.cjs"
},
"main": "dist/index.cjs",
"unpkg": "dist/index.umd.production.min.cjs",
"module": "dist/index.esm.mjs",
"types": "dist/index.d.ts",
"typings": "dist/index.d.ts",
"files": [
"index.js",
"deep-eql.js"
"dist/index.cjs",
"dist/index.cjs.development.cjs",
"dist/index.cjs.development.cjs.map",
"dist/index.cjs.production.min.cjs",
"dist/index.cjs.production.min.cjs.map",
"dist/index.esm.mjs",
"dist/index.esm.mjs.map",
"dist/index.umd.development.cjs",
"dist/index.umd.development.cjs.map",
"dist/index.umd.production.min.cjs",
"dist/index.umd.production.min.cjs.map"
],
"repository": {
"type": "git",
"url": "[email protected]:chaijs/deep-eql.git"
},
"scripts": {
"bench": "node bench",
"build": "browserify $npm_package_main --standalone deepEqual -o deep-eql.js",
"build": "tsdx build --name deepEqual",
"lint": "eslint --ignore-path .gitignore .",
"prepublish": "npm run build",
"semantic-release": "semantic-release pre && npm publish && semantic-release post",
@@ -56,6 +80,8 @@
"type-detect": "^4.0.0"
},
"devDependencies": {
"@bluelovers/tsconfig": "^1.0.30",
"@bluelovers/tsdx": "^2.2.1",
"benchmark": "^2.1.0",
"browserify": "^17.0.0",
"browserify-istanbul": "^3.0.1",
File renamed without changes.
7 changes: 7 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"extends": "@bluelovers/tsconfig/tsdx/index.json",
"compilerOptions": {
"importHelpers": true,
"allowJs": true
}
}