|
3 | 3 | "version": "1.2.0", |
4 | 4 | "description": "Tiny 200b functional Event Emitter / pubsub.", |
5 | 5 | "jsnext:main": "dist/mitt.es.js", |
| 6 | + "source": "src/index.ts", |
6 | 7 | "module": "dist/mitt.es.js", |
7 | 8 | "main": "dist/mitt.js", |
8 | 9 | "umd:main": "dist/mitt.umd.js", |
| 10 | + "typings": "dist/index.d.ts", |
9 | 11 | "scripts": { |
10 | 12 | "bump": "standard-version", |
11 | | - "testonly": "mocha --require esm --require flow-remove-types/register test/**/*.js", |
12 | | - "lint": "eslint src test", |
13 | | - "test": "flow && npm run lint && npm run testonly", |
14 | | - "build": "npm-run-all --silent clean -p rollup -p minify:* -s docs size", |
| 13 | + "testonly": "mocha --require esm --require ts-node/register test/**/*.js", |
| 14 | + "lint": "eslint src test --ext ts --ext js", |
| 15 | + "test": "tsc src/index.ts --noEmit && npm run lint && npm run testonly", |
| 16 | + "bundle": "microbundle", |
| 17 | + "build": "npm-run-all --silent clean -p bundle -s docs size", |
15 | 18 | "clean": "rimraf dist", |
16 | | - "rollup": "rollup -c", |
17 | | - "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", |
18 | | - "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", |
19 | | - "docs": "documentation readme src/index.js --section API -q", |
| 19 | + "docs": "documentation readme src/index.ts --section API -q --parse-extension ts", |
20 | 20 | "size": "echo \"Gzipped Size: $(strip-json-comments --no-whitespace $npm_package_main | gzip-size | pretty-bytes)\"", |
21 | 21 | "release": "npm run build -s && npm run bump && git push --follow-tags origin master && npm publish" |
22 | 22 | }, |
|
33 | 33 | "license": "MIT", |
34 | 34 | "files": [ |
35 | 35 | "src", |
36 | | - "dist", |
37 | | - "mitt.d.ts" |
| 36 | + "dist" |
38 | 37 | ], |
39 | | - "babel": { |
40 | | - "presets": [ |
41 | | - "es2015", |
42 | | - "stage-0" |
43 | | - ], |
44 | | - "plugins": [ |
45 | | - "transform-flow-strip-types" |
46 | | - ] |
47 | | - }, |
48 | 38 | "eslintConfig": { |
49 | | - "extends": "eslint:recommended", |
50 | | - "parser": "babel-eslint", |
| 39 | + "extends": [ |
| 40 | + "eslint:recommended", |
| 41 | + "plugin:@typescript-eslint/eslint-recommended", |
| 42 | + "plugin:@typescript-eslint/recommended" |
| 43 | + ], |
| 44 | + "parser": "@typescript-eslint/parser", |
51 | 45 | "parserOptions": { |
52 | 46 | "sourceType": "module" |
53 | 47 | }, |
|
63 | 57 | "semi": [ |
64 | 58 | 2, |
65 | 59 | "always" |
66 | | - ] |
| 60 | + ], |
| 61 | + "@typescript-eslint/no-explicit-any": 0, |
| 62 | + "@typescript-eslint/explicit-function-return-type": 0, |
| 63 | + "@typescript-eslint/no-empty-function": 0 |
67 | 64 | } |
68 | 65 | }, |
69 | | - "typings": "./mitt.d.ts", |
70 | 66 | "devDependencies": { |
71 | | - "babel-core": "^6.9.1", |
72 | | - "babel-eslint": "^10.0.3", |
73 | | - "babel-plugin-transform-flow-strip-types": "^6.21.0", |
74 | | - "babel-preset-es2015": "^6.9.0", |
75 | | - "babel-preset-stage-0": "^6.5.0", |
| 67 | + "@typescript-eslint/eslint-plugin": "^2.34.0", |
| 68 | + "@typescript-eslint/parser": "^2.34.0", |
76 | 69 | "chai": "^3.5.0", |
77 | | - "documentation": "^4.0.0-beta4", |
| 70 | + "documentation": "^13.0.0", |
78 | 71 | "eslint": "^6.5.1", |
79 | 72 | "esm": "^3.2.25", |
80 | | - "flow-bin": "^0.38.0", |
81 | | - "flow-remove-types": "^1.2.0", |
82 | 73 | "gzip-size-cli": "^1.0.0", |
| 74 | + "microbundle": "^0.12.0", |
83 | 75 | "mocha": "^3.2.0", |
84 | 76 | "npm-run-all": "^2.1.1", |
85 | 77 | "pretty-bytes-cli": "^2.0.0", |
86 | 78 | "rimraf": "^2.5.2", |
87 | | - "rollup": "^0.41.4", |
88 | | - "rollup-plugin-buble": "^0.15.0", |
89 | | - "rollup-plugin-flow": "^1.1.1", |
90 | 79 | "sinon": "^1.17.4", |
91 | 80 | "sinon-chai": "^2.8.0", |
92 | 81 | "standard-version": "^4.0.0", |
93 | 82 | "strip-json-comments-cli": "^1.0.1", |
94 | | - "uglify-js": "^2.6.2" |
| 83 | + "ts-node": "^8.10.1", |
| 84 | + "typescript": "^3.9.3" |
95 | 85 | } |
96 | 86 | } |
0 commit comments