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

add "module" entrypoint, replace esnext with es2020 #105

Merged
merged 1 commit into from
Feb 22, 2020
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.DS_Store
dist
dist.esnext
dist.esm
node_modules
perf/filesize/bundle.js
yarn-error.log
9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"version": "5.1.1",
"description": "Dead simple state management for React",
"main": "dist/src/index.js",
"main:esnext": "dist.esnext/index.js",
"module": "dist.esm/index.js",
"main:esnext": "dist.esm/index.js",
"typings": "dist/src/index.d.ts",
"author": "Boris Cherny <[email protected]>",
"license": "MIT",
Expand All @@ -16,9 +17,9 @@
},
"homepage": "https://github.com/bcherny/undux#readme",
"scripts": {
"build": "npm run clean && npm run lint && tsc -d && npm run build:esnext && flow focus-check src/index.js.flow && cp src/index.js.flow dist/src/index.js.flow",
"build:esnext": "tsc -d -p ./tsconfig.esnext.json",
"clean": "shx rm -rf dist dist.esnext",
"build": "npm run clean && npm run lint && tsc -d && npm run build:esm && flow focus-check src/index.js.flow && cp src/index.js.flow dist/src/index.js.flow",
"build:esm": "tsc -d -p ./tsconfig.esm.json",
"clean": "shx rm -rf dist dist.esm",
"format": "prettier --write src/* src/**/* test/**/*",
"lint": "eslint ./src/**/*",
"profile:filesize": "webpack --config ./perf/filesize/webpack.config.js -p && cat ./perf/filesize/bundle.js | gzip | wc -c",
Expand Down
4 changes: 2 additions & 2 deletions tsconfig.esnext.json → tsconfig.esm.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@
"module": "esnext",
"moduleResolution": "node",
"newLine": "LF",
"outDir": "dist.esnext",
"outDir": "dist.esm",
"preserveConstEnums": true,
"skipLibCheck": true,
"sourceMap": true,
"strict": true,
"target": "esnext",
"target": "es2020",
"paths": {
"typed-rx-emitter": ["node_modules/typed-rx-emitter/dist.esnext"]
}
Expand Down