|
3 | 3 | "amdName": "linkState", |
4 | 4 | "version": "1.1.1", |
5 | 5 | "description": "Bind events to state. Works with Preact and React.", |
6 | | - "main": "dist/linkstate.js", |
7 | | - "module": "dist/linkstate.es.js", |
8 | | - "jsnext:main": "dist/linkstate.es.js", |
9 | | - "umd:main": "dist/linkstate.umd.js", |
| 6 | + "main": "./dist/linkstate.js", |
| 7 | + "module": "./dist/linkstate.module.js", |
| 8 | + "umd:main": "./dist/linkstate.umd.js", |
| 9 | + "unpkg": "./dist/linkstate.umd.js", |
| 10 | + "exports": { |
| 11 | + ".": "./dist/linkstate.module.js", |
| 12 | + "./polyfill": "./dist/polyfill.module.js", |
| 13 | + "./hook": "./dist/hook.module.js", |
| 14 | + "./": "./" |
| 15 | + }, |
10 | 16 | "scripts": { |
11 | | - "test": "eslint src test && mocha -r jsdom-global/register --compilers js:babel-register test/**/*.js", |
12 | | - "build": "npm-run-all --silent clean -p transpile:* -s size", |
13 | | - "clean": "rimraf dist && mkdirp dist", |
14 | | - "transpile:umd": "rollup -c --environment FORMAT:umd", |
15 | | - "transpile:cjs": "rollup -c --environment FORMAT:cjs", |
16 | | - "transpile:es": "rollup -c --environment FORMAT:es", |
17 | | - "transpile:polyfill": "rollup -c --environment FORMAT:cjs src/polyfill.js -o polyfill.js", |
18 | | - "transpile:polyfill-umd": "rollup -c --environment FORMAT:umd src/polyfill.js -o dist/polyfill.umd.js", |
19 | | - "minify:cjs": "uglifyjs $npm_package_main -cm toplevel -o $npm_package_main -p relative --in-source-map ${npm_package_main}.map --source-map ${npm_package_main}.map", |
20 | | - "minify:umd": "uglifyjs $npm_package_umd_main -cm -o $npm_package_umd_main -p relative --in-source-map ${npm_package_umd_main}.map --source-map ${npm_package_umd_main}.map", |
21 | | - "size": "echo \"Gzipped Size: $(strip-json-comments --no-whitespace $npm_package_main | gzip-size)\"", |
| 17 | + "test": "eslint src test && mocha -r jsdom-global/register -r esm test/**/*.js", |
| 18 | + "build": "microbundle -f es,cjs,umd && (cd hook && microbundle -f es,cjs,umd) && (cd polyfill && microbundle -f es,cjs,umd)", |
22 | 19 | "prepublish": "npm run -s build", |
23 | | - "release": "npm run build -s && git commit -am $npm_package_version && git tag $npm_package_version && git push --follow-tags && npm publish" |
| 20 | + "release": "npm run build -s && git commit -am $npm_package_version && git tag $npm_package_version && git push && git push --tags && npm publish" |
24 | 21 | }, |
25 | 22 | "typings": "src/index.d.ts", |
26 | 23 | "repository": "developit/linkstate", |
|
39 | 36 | "files": [ |
40 | 37 | "src", |
41 | 38 | "dist", |
42 | | - "polyfill.js", |
43 | | - "polyfill.js.map" |
| 39 | + "polyfill", |
| 40 | + "hook" |
44 | 41 | ], |
45 | | - "babel": { |
46 | | - "presets": [ |
47 | | - "es2015", |
48 | | - "stage-0" |
49 | | - ] |
50 | | - }, |
51 | 42 | "eslintConfig": { |
52 | | - "parser": "babel-eslint", |
53 | | - "extends": "eslint:recommended", |
54 | | - "env": { |
55 | | - "browser": true, |
56 | | - "mocha": true, |
57 | | - "node": true, |
58 | | - "es6": true |
59 | | - }, |
60 | | - "globals": { |
61 | | - "expect": true |
| 43 | + "extends": "developit", |
| 44 | + "rules": { |
| 45 | + "jest/valid-expect": 0 |
62 | 46 | } |
63 | 47 | }, |
64 | 48 | "devDependencies": { |
65 | | - "babel-core": "^6.9.1", |
66 | | - "babel-eslint": "^7.1.1", |
67 | | - "babel-preset-es2015": "^6.9.0", |
68 | | - "babel-preset-stage-0": "^6.5.0", |
69 | | - "babel-register": "^6.9.0", |
70 | | - "chai": "^3.5.0", |
71 | | - "cross-env": "^3.1.4", |
| 49 | + "chai": "^4.2.0", |
72 | 50 | "dlv": "^1.1.0", |
73 | | - "eslint": "^3.13.1", |
74 | | - "gzip-size-cli": "^1.0.0", |
75 | | - "jsdom": "^9.12.0", |
76 | | - "jsdom-global": "^2.1.1", |
77 | | - "mkdirp": "^0.5.1", |
78 | | - "mocha": "^3.2.0", |
79 | | - "npm-run-all": "^2.1.1", |
80 | | - "rimraf": "^2.5.2", |
81 | | - "rollup": "^0.41.4", |
82 | | - "rollup-plugin-alias": "^1.2.1", |
83 | | - "rollup-plugin-buble": "^0.15.0", |
84 | | - "rollup-plugin-node-resolve": "^3.0.0", |
85 | | - "rollup-plugin-post-replace": "^1.0.0", |
86 | | - "rollup-plugin-uglify": "^1.0.1", |
87 | | - "sinon": "^1.17.4", |
88 | | - "sinon-chai": "^2.8.0", |
89 | | - "strip-json-comments-cli": "^1.0.1", |
90 | | - "uglify-js": "^2.6.2" |
| 51 | + "eslint": "^7.13.0", |
| 52 | + "eslint-config-developit": "^1.2.0", |
| 53 | + "jsdom": "^16.4.0", |
| 54 | + "jsdom-global": "^3.0.2", |
| 55 | + "microbundle": "^0.12.4", |
| 56 | + "mocha": "^8.2.1", |
| 57 | + "sinon": "^9.2.1", |
| 58 | + "sinon-chai": "^3.5.0" |
91 | 59 | }, |
92 | 60 | "peerDependencies": { |
93 | | - "preact": ">=10" |
| 61 | + "preact": "*" |
| 62 | + }, |
| 63 | + "dependencies": { |
| 64 | + "esm": "^3.2.25" |
94 | 65 | } |
95 | 66 | } |
0 commit comments