diff --git a/.gitignore b/.gitignore index d3ef734..6e1ef54 100644 --- a/.gitignore +++ b/.gitignore @@ -131,3 +131,7 @@ dist # Netscript Type Definitions. These are pulled from the game NetscriptDefinitions.d.ts + +# Location of the files mirrored from the game + +mirror/ diff --git a/build.mjs b/build.mjs index 75149a8..7e0773a 100644 --- a/build.mjs +++ b/build.mjs @@ -13,7 +13,11 @@ const createContext = async () => await context({ plugins: [ BitburnerPlugin({ port: 12525, - types: 'NetscriptDefinitions.d.ts' + types: 'NetscriptDefinitions.d.ts', + // mirror: { //uncomment to enable file mirroring + // 'mirror/own': ['home'], + // 'mirror/other': ['n00dles'] + // } }) ], bundle: true, diff --git a/global.d.ts b/global.d.ts new file mode 100644 index 0000000..c7ba399 --- /dev/null +++ b/global.d.ts @@ -0,0 +1,5 @@ +import {NS as _NS} from 'NetscriptDefinitions'; + +declare global { + type NS = _NS; +} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 7fc8e06..a810872 100644 Binary files a/package-lock.json and b/package-lock.json differ diff --git a/package.json b/package.json index 61ee956..59cd844 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,6 @@ "@types/react": "^18.2.25", "@types/react-dom": "^18.2.10", "esbuild": "^0.19.4", - "esbuild-bitburner-plugin": "^1.1.0", - "glob": "^10.3.10" + "esbuild-bitburner-plugin": "^1.1.0" } } diff --git a/tsconfig.json b/tsconfig.json index 9eef447..a2a30a5 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -10,6 +10,7 @@ "dom", "dom.iterable" ], + "allowJs": true, "baseUrl": "./", "jsx": "react", "paths": { @@ -20,6 +21,6 @@ } }, "include": [ - "servers/**/*.ts*" + "servers/**/*", "global.d.ts", "mirror/**/*" ] }