Skip to content

Commit

Permalink
Add Package Exports configuration (#139)
Browse files Browse the repository at this point in the history
* Add Package Exports configuration (semver major)

* Update compressed-size.yml
  • Loading branch information
developit authored Jun 23, 2021
1 parent ec0aab7 commit f3990ec
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/compressed-size.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@ jobs:
steps:
- uses: actions/checkout@v2
- uses: preactjs/compressed-size-action@v2
with:
pattern: "./dist/*.{js,mjs,cjs}"
14 changes: 9 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,24 @@
"name": "mitt",
"version": "2.1.0",
"description": "Tiny 200b functional Event Emitter / pubsub.",
"jsnext:main": "dist/mitt.es.js",
"source": "src/index.ts",
"module": "dist/mitt.es.js",
"esmodules": "dist/mitt.modern.js",
"module": "dist/mitt.mjs",
"main": "dist/mitt.js",
"jsnext:main": "dist/mitt.mjs",
"umd:main": "dist/mitt.umd.js",
"source": "src/index.ts",
"typings": "index.d.ts",
"exports": {
"import": "./dist/mitt.mjs",
"require": "./dist/mitt.js",
"default": "./dist/mitt.mjs"
},
"scripts": {
"test": "npm-run-all --silent typecheck lint mocha test-types",
"mocha": "mocha test",
"test-types": "tsc test/test-types-compilation.ts --noEmit --strict",
"lint": "eslint src test --ext ts --ext js",
"typecheck": "tsc --noEmit",
"bundle": "microbundle",
"bundle": "microbundle -f es,cjs,umd",
"build": "npm-run-all --silent clean -p bundle -s docs",
"clean": "rimraf dist",
"docs": "documentation readme src/index.ts --section API -q --parse-extension ts",
Expand Down

0 comments on commit f3990ec

Please sign in to comment.