diff options
author | Björn Harrtell <bjornharrtell@users.noreply.github.com> | 2020-09-17 21:21:14 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-17 12:21:14 -0700 |
commit | 94873e595c6f231202929501570088849f3b8803 (patch) | |
tree | a360d12bc06c2a36c29947803d2787aa8fb69820 /package.json | |
parent | b8e87fafe4f46233c16908f75a30256925bf72d8 (diff) | |
download | flatbuffers-94873e595c6f231202929501570088849f3b8803.tar.gz flatbuffers-94873e595c6f231202929501570088849f3b8803.tar.bz2 flatbuffers-94873e595c6f231202929501570088849f3b8803.zip |
[JS/TS] Modernize TypeScript / JavaScript flatbuffers support (#6095)
Diffstat (limited to 'package.json')
-rw-r--r-- | package.json | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/package.json b/package.json index d01680a0..4b9f71f3 100644 --- a/package.json +++ b/package.json @@ -3,19 +3,24 @@ "version": "1.12.0", "description": "Memory Efficient Serialization Library", "files": [ - "js/flatbuffers.js", - "js/flatbuffers.mjs" + "js/*.js", + "js/*.d.ts", + "mjs/*.js", + "mjs/*.d.ts", + "ts/*.ts" ], "main": "js/flatbuffers", - "module": "js/flatbuffers.mjs", + "module": "mjs/index.mjs", "directories": { "doc": "docs", "test": "tests" }, "scripts": { - "test": "tests/JavaScriptTest.sh", + "test": "cd tests && ./JavaScriptTest.sh", + "compile-ts": "tsc && tsc -p tsconfig.mjs.json", + "pretest": "npm run compile-ts", "append-esm-export": "sed \"s/this.flatbuffers = flatbuffers;/export { flatbuffers };/\" js/flatbuffers.js > js/flatbuffers.mjs", - "prepublishOnly": "npm run append-esm-export" + "prepublishOnly": "npm run compile-ts && npm run append-esm-export" }, "repository": { "type": "git", @@ -30,5 +35,11 @@ "url": "https://github.com/google/flatbuffers/issues" }, "homepage": "https://google.github.io/flatbuffers/", - "dependencies": {} + "dependencies": {}, + "devDependencies": { + "@typescript-eslint/eslint-plugin": "^4.1.0", + "@typescript-eslint/parser": "^4.1.0", + "eslint": "^7.8.1", + "typescript": "^4.0.2" + } } |