Include subdirectories in published npm package (#6850)

Updates the `files` globs in package.json to include subdirectories in order to also include the flexbuffers directory in the published npm package.

Updates .gitignore to include the tsc-generated JS files.
diff --git a/.gitignore b/.gitignore
index 651ba76..6a73189 100644
--- a/.gitignore
+++ b/.gitignore
@@ -101,7 +101,10 @@
 samples/android/.externalNativeBuild/
 samples/android/.gradle/
 samples/android/build/
-js/flatbuffers.mjs
+js/**/*.js
+js/**/*.d.ts
+mjs/**/*.js
+mjs/**/*.d.ts
 /bazel-bin
 /bazel-flatbuffers
 /bazel-genfiles
diff --git a/package.json b/package.json
index 8d143be..7784a1a 100644
--- a/package.json
+++ b/package.json
@@ -3,11 +3,11 @@
   "version": "2.0.3",
   "description": "Memory Efficient Serialization Library",
   "files": [
-    "js/*.js",
-    "js/*.d.ts",
-    "mjs/*.js",
-    "mjs/*.d.ts",
-    "ts/*.ts"
+    "js/**/*.js",
+    "js/**/*.d.ts",
+    "mjs/**/*.js",
+    "mjs/**/*.d.ts",
+    "ts/**/*.ts"
   ],
   "main": "js/flatbuffers.js",
   "module": "mjs/flatbuffers.js",