diff options
| author | Jack Franklin <[email protected]> | 2020-05-26 22:45:53 +0100 |
|---|---|---|
| committer | GitHub <[email protected]> | 2020-05-26 17:45:53 -0400 |
| commit | be5237f301b1059ffff9e1e795fd66594644892a (patch) | |
| tree | c5cae9f5aefeb481dcd88264b2c48c8f248ad42c /package.json | |
| parent | cfd246c8fa9f6e255b63cb98a832b6501cfaa23d (diff) | |
Migrate to TypeScript and use Map (#99)
Migrate to TypeScript & Microbundle, move to Map for event handler storage
Diffstat (limited to 'package.json')
| -rw-r--r-- | package.json | 60 |
1 files changed, 25 insertions, 35 deletions
diff --git a/package.json b/package.json index 6275b3a..ac14731 100644 --- a/package.json +++ b/package.json @@ -3,20 +3,20 @@ "version": "1.2.0", "description": "Tiny 200b functional Event Emitter / pubsub.", "jsnext:main": "dist/mitt.es.js", + "source": "src/index.ts", "module": "dist/mitt.es.js", "main": "dist/mitt.js", "umd:main": "dist/mitt.umd.js", + "typings": "dist/index.d.ts", "scripts": { "bump": "standard-version", - "testonly": "mocha --require esm --require flow-remove-types/register test/**/*.js", - "lint": "eslint src test", - "test": "flow && npm run lint && npm run testonly", - "build": "npm-run-all --silent clean -p rollup -p minify:* -s docs size", + "testonly": "mocha --require esm --require ts-node/register test/**/*.js", + "lint": "eslint src test --ext ts --ext js", + "test": "tsc src/index.ts --noEmit && npm run lint && npm run testonly", + "bundle": "microbundle", + "build": "npm-run-all --silent clean -p bundle -s docs size", "clean": "rimraf dist", - "rollup": "rollup -c", - "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", - "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", - "docs": "documentation readme src/index.js --section API -q", + "docs": "documentation readme src/index.ts --section API -q --parse-extension ts", "size": "echo \"Gzipped Size: $(strip-json-comments --no-whitespace $npm_package_main | gzip-size | pretty-bytes)\"", "release": "npm run build -s && npm run bump && git push --follow-tags origin master && npm publish" }, @@ -33,21 +33,15 @@ "license": "MIT", "files": [ "src", - "dist", - "mitt.d.ts" + "dist" ], - "babel": { - "presets": [ - "es2015", - "stage-0" - ], - "plugins": [ - "transform-flow-strip-types" - ] - }, "eslintConfig": { - "extends": "eslint:recommended", - "parser": "babel-eslint", + "extends": [ + "eslint:recommended", + "plugin:@typescript-eslint/eslint-recommended", + "plugin:@typescript-eslint/recommended" + ], + "parser": "@typescript-eslint/parser", "parserOptions": { "sourceType": "module" }, @@ -63,34 +57,30 @@ "semi": [ 2, "always" - ] + ], + "@typescript-eslint/no-explicit-any": 0, + "@typescript-eslint/explicit-function-return-type": 0, + "@typescript-eslint/no-empty-function": 0 } }, - "typings": "./mitt.d.ts", "devDependencies": { - "babel-core": "^6.9.1", - "babel-eslint": "^10.0.3", - "babel-plugin-transform-flow-strip-types": "^6.21.0", - "babel-preset-es2015": "^6.9.0", - "babel-preset-stage-0": "^6.5.0", + "@typescript-eslint/eslint-plugin": "^2.34.0", + "@typescript-eslint/parser": "^2.34.0", "chai": "^3.5.0", - "documentation": "^4.0.0-beta4", + "documentation": "^13.0.0", "eslint": "^6.5.1", "esm": "^3.2.25", - "flow-bin": "^0.38.0", - "flow-remove-types": "^1.2.0", "gzip-size-cli": "^1.0.0", + "microbundle": "^0.12.0", "mocha": "^3.2.0", "npm-run-all": "^2.1.1", "pretty-bytes-cli": "^2.0.0", "rimraf": "^2.5.2", - "rollup": "^0.41.4", - "rollup-plugin-buble": "^0.15.0", - "rollup-plugin-flow": "^1.1.1", "sinon": "^1.17.4", "sinon-chai": "^2.8.0", "standard-version": "^4.0.0", "strip-json-comments-cli": "^1.0.1", - "uglify-js": "^2.6.2" + "ts-node": "^8.10.1", + "typescript": "^3.9.3" } } |
