Update template for new extension link

This commit is contained in:
Cyn 2022-01-05 19:35:19 -05:00
parent 7aa19ac2c6
commit 59e5eef9b1
6 changed files with 7 additions and 7 deletions

View File

@ -14,7 +14,7 @@ module.exports = {
},
},
plugins: ["@typescript-eslint"],
ignorePatterns: ['NetscriptDefinitions.d.ts'],
ignorePatterns: ['NetscriptDefinitions.d.ts', '*.js'],
rules: {
"accessor-pairs": [
"error",

1
.gitignore vendored
View File

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

View File

@ -2,6 +2,6 @@
"recommendations": [
"dbaeumer.vscode-eslint",
"Gruntfuggly.auto-snippet",
"hexnaught.vscode-bitburner-connector"
"bitburner.bitburner-vscode-integration"
]
}

View File

@ -1,5 +1,5 @@
## Extension Recommendations
[vscode-bitburner-connector](https://github.com/hexnaught/vscode-bitburner-connector) ([vscode extension marketplace](https://marketplace.visualstudio.com/items?itemName=hexnaught.vscode-bitburner-connector)) to upload your files into the game
[vscode-bitburner-connector](https://github.com/bitburner-official/bitburner-vscode) ([vscode extension marketplace](https://marketplace.visualstudio.com/items?itemName=bitburner.bitburner-vscode-integration)) to upload your files into the game
[vscode-eslint](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint) to use live linting in editor

View File

@ -18,6 +18,7 @@
},
"homepage": "https://github.com/SlyCedix/bitburner-typescript-template#readme",
"devDependencies": {
"@types/lodash": "^4.14.178",
"@types/node": "^16.4.3",
"@typescript-eslint/eslint-plugin": "^4.28.4",
"@typescript-eslint/parser": "^4.28.4",

View File

@ -17,16 +17,16 @@ export async function main(ns: NS): Promise<void> {
const hash = getHash(contents)
if (hash != hashes[file]) {
ns.tprint(`INFO: Detected change in ${file}`)
ns.tprintf(`INFO: Detected change in ${file}`)
const processes = ns.ps().filter((p: ProcessInfo) => {
return p.filename == file
})
for (const process of processes) {
ns.tprint(`INFO: Restarting ${process.filename} ${process.args} -t ${process.threads}`)
ns.tprintf(`INFO: Restarting ${process.filename} ${process.args} -t ${process.threads}`)
if (process.filename != ns.getScriptName()) {
ns.kill(process.pid, ns.getHostname())
ns.kill(process.pid)
ns.run(process.filename, process.threads, ...process.args)
} else {
ns.spawn(process.filename, process.threads, ...process.args)