From 0c0adf29d5c616e10b7ea4a0e6a916851914f427 Mon Sep 17 00:00:00 2001 From: David Edmondson Date: Tue, 7 Sep 2021 12:04:01 -0700 Subject: [PATCH] Separate src, test, cypress --- .gitignore | 1 + cypress/tsconfig.json | 7 +++++++ package-lock.json | 5 ++--- test/tsconfig.spec.json | 4 ++++ tsconfig.base.json | 13 +++++++++++++ tsconfig.json | 25 ++++++++++++------------- tsconfig.src.json | 4 ++++ 7 files changed, 43 insertions(+), 16 deletions(-) create mode 100644 cypress/tsconfig.json create mode 100644 test/tsconfig.spec.json create mode 100644 tsconfig.base.json create mode 100644 tsconfig.src.json diff --git a/.gitignore b/.gitignore index 35a419b0f..63c90cd7a 100644 --- a/.gitignore +++ b/.gitignore @@ -8,6 +8,7 @@ Netburner.txt /test/*.bundle.* /test/*.css .cypress +dist-tsc # editor files .vscode diff --git a/cypress/tsconfig.json b/cypress/tsconfig.json new file mode 100644 index 000000000..608a1a0c9 --- /dev/null +++ b/cypress/tsconfig.json @@ -0,0 +1,7 @@ +{ + "extends": "../tsconfig.base.json", + "include": ["**/*"], + "compilerOptions": { + "types": ["cypress", "@testing-library/cypress"] + } +} diff --git a/package-lock.json b/package-lock.json index 698385c86..59e15941b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5,6 +5,7 @@ "requires": true, "packages": { "": { + "name": "bitburner", "version": "0.52.9", "hasInstallScript": true, "license": "SEE LICENSE IN license.txt", @@ -39258,9 +39259,7 @@ "version": "1.0.6", "resolved": "https://registry.npmjs.org/mathjax-react/-/mathjax-react-1.0.6.tgz", "integrity": "sha512-GlkPAhaY0FKc95TMdo33mxNZHb+3xRgfgc3YcnQ0cZxvnM1UaF0o8mRI5y5xIwi3JnioeYuukZJWCbIZkACIVw==", - "requires": { - "mathjax-full": "^3.0.4" - } + "requires": {} }, "mathml-tag-names": { "version": "2.1.0", diff --git a/test/tsconfig.spec.json b/test/tsconfig.spec.json new file mode 100644 index 000000000..01e09f3b9 --- /dev/null +++ b/test/tsconfig.spec.json @@ -0,0 +1,4 @@ +{ + "extends": "../tsconfig.base.json", + "include": ["**/*"] +} diff --git a/tsconfig.base.json b/tsconfig.base.json new file mode 100644 index 000000000..c30a2e1ac --- /dev/null +++ b/tsconfig.base.json @@ -0,0 +1,13 @@ +{ + "compilerOptions": { + "outDir": "./dist-tsc/", + "esModuleInterop": true, + "isolatedModules": true, + "jsx": "react", + "lib": ["es2016", "dom", "es2017.object", "es2019"], + "module": "commonjs", + "target": "es6", + "sourceMap": true, + "strict": true + } +} diff --git a/tsconfig.json b/tsconfig.json index b488241a0..213ba669b 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,15 +1,14 @@ { - "compilerOptions": { - "baseUrl": ".", - "esModuleInterop": true, - "isolatedModules": true, - "jsx": "react", - "lib": ["es2016", "dom", "es2017.object", "es2019"], - "module": "commonjs", - "target": "es6", - "sourceMap": true, - "strict": true, - "types": ["cypress", "@testing-library/cypress"] - }, - "exclude": ["node_modules"] + "files": [], + "references": [ + { + "path": "./tsconfig.src.json" + }, + { + "path": "./test/tsconfig.spec.json" + }, + { + "path": "./cypress/tsconfig.json" + } + ] } diff --git a/tsconfig.src.json b/tsconfig.src.json new file mode 100644 index 000000000..b5f69ac4c --- /dev/null +++ b/tsconfig.src.json @@ -0,0 +1,4 @@ +{ + "extends": "./tsconfig.base.json", + "exclude": ["node_modules", "cypress", "test"] +}