Browse Source

fix: compiling issues for codemirror-lang-graphql

Andrew Bastin 3 years ago
parent
commit
245b8a6e3c

+ 0 - 1
packages/codemirror-lang-graphql/.gitignore

@@ -1,5 +1,4 @@
 /node_modules
 /node_modules
 package-lock.json
 package-lock.json
 /dist
 /dist
-/src/*.js
 /src/*.d.ts
 /src/*.d.ts

+ 1 - 1
packages/codemirror-lang-graphql/rollup.config.js

@@ -2,7 +2,7 @@ import typescript from "rollup-plugin-ts"
 import {lezer} from "@lezer/generator/rollup"
 import {lezer} from "@lezer/generator/rollup"
 
 
 export default {
 export default {
-  input: "src/index.ts",
+  input: "src/index.js",
   external: id => id != "tslib" && !/^(\.?\/|\w:)/.test(id),
   external: id => id != "tslib" && !/^(\.?\/|\w:)/.test(id),
   output: [
   output: [
     {file: "dist/index.cjs", format: "cjs"},
     {file: "dist/index.cjs", format: "cjs"},

+ 0 - 0
packages/codemirror-lang-graphql/src/index.ts → packages/codemirror-lang-graphql/src/index.js


+ 1 - 1
packages/codemirror-lang-graphql/src/syntax.grammar

@@ -338,7 +338,7 @@ TypeSystemDirectiveLocation {
 
 
 @tokens {
 @tokens {
   Whitespace {
   Whitespace {
-    std.whitespace
+    std.whitespace+
   }
   }
   StringValue {
   StringValue {
     "\"\"\"" (!["] | "\\n" | "\"" "\""? !["])* "\"\"\"" | "\"" !["\\\n]* "\""
     "\"\"\"" (!["] | "\\n" | "\"" "\""? !["])* "\"\"\"" | "\"" !["\\\n]* "\""

+ 4 - 3
packages/codemirror-lang-graphql/tsconfig.json

@@ -5,7 +5,8 @@
     "module": "es2020",
     "module": "es2020",
     "newLine": "lf",
     "newLine": "lf",
     "declaration": true,
     "declaration": true,
-    "moduleResolution": "node"
+    "moduleResolution": "node",
+    "allowJs": true,
   },
   },
-  "include": ["src/*.ts"]
-}
+  "include": ["src/*"]
+}