mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-08 16:53:54 +01:00
[chore] Introduce TypeScript; Tested out with HelpText.
This commit is contained in:
parent
ec862ec747
commit
3e1ec388e0
1965
package-lock.json
generated
1965
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -62,6 +62,8 @@
|
||||
"sinon": "^2.3.2",
|
||||
"source-map": "^0.7.3",
|
||||
"style-loader": "^0.21.0",
|
||||
"ts-loader": "^4.4.1",
|
||||
"typescript": "^2.9.2",
|
||||
"url-loader": "^1.0.1",
|
||||
"watchpack": "^1.6.0",
|
||||
"webpack": "^4.12.0",
|
||||
@ -84,7 +86,7 @@
|
||||
"start:dev": "webpack-dev-server",
|
||||
"build": "webpack --mode production",
|
||||
"build:dev": "webpack --mode development",
|
||||
"watch" : "webpack --watch --mode production",
|
||||
"watch": "webpack --watch --mode production",
|
||||
"watch:dev": "webpack --watch --mode development"
|
||||
},
|
||||
"version": "0.35.1"
|
||||
|
@ -1,5 +1,4 @@
|
||||
/* HelpText.js */
|
||||
let TerminalHelpText =
|
||||
export const TerminalHelpText =
|
||||
"Type 'help name' to learn more about the command 'name'<br><br>" +
|
||||
'alias [-g] [name="value"] Create or display Terminal aliases<br>' +
|
||||
"analyze Get information about the current machine <br>" +
|
||||
@ -34,7 +33,7 @@ let TerminalHelpText =
|
||||
"top Displays all running scripts and their RAM usage<br>" +
|
||||
'unalias "[alias name]" Deletes the specified alias<br>';
|
||||
|
||||
let HelpTexts = {
|
||||
export const HelpTexts = {
|
||||
alias: 'alias [-g] [name="value"] <br>' +
|
||||
"Create or display aliases. An alias enables a replacement of a word with another string. " +
|
||||
"It can be used to abbreviate a commonly used command, or commonly used parts of a command. The NAME " +
|
||||
@ -213,5 +212,3 @@ let HelpTexts = {
|
||||
"It is not necessary to differentiate between global and non-global aliases when using 'unalias'",
|
||||
|
||||
}
|
||||
|
||||
export {TerminalHelpText, HelpTexts};
|
@ -9,7 +9,7 @@ import {executeDarkwebTerminalCommand,
|
||||
import {Engine} from "./engine.js";
|
||||
import {FconfSettings, parseFconfSettings,
|
||||
createFconf} from "./Fconf.js";
|
||||
import {TerminalHelpText, HelpTexts} from "./HelpText.js";
|
||||
import {TerminalHelpText, HelpTexts} from "./HelpText";
|
||||
import {iTutorialNextStep, iTutorialSteps,
|
||||
iTutorialIsRunning,
|
||||
currITutorialStep} from "./InteractiveTutorial.js";
|
||||
|
10
tsconfig.json
Normal file
10
tsconfig.json
Normal file
@ -0,0 +1,10 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"target": "es5",
|
||||
"sourceMap": true
|
||||
},
|
||||
"exclude": [
|
||||
"node_modules"
|
||||
]
|
||||
}
|
@ -2,7 +2,6 @@ var path = require('path');
|
||||
var webpack = require('webpack');
|
||||
|
||||
module.exports = (env, argv) => ({
|
||||
//mode: "development",
|
||||
plugins: [
|
||||
new webpack.DefinePlugin({
|
||||
'process.env.NODE_ENV': argv.mode === 'development' ? "\"development\"" : "\"production\""
|
||||
@ -28,7 +27,13 @@ module.exports = (env, argv) => ({
|
||||
filename: "[name].bundle.js"
|
||||
},
|
||||
module: {
|
||||
rules: []
|
||||
rules: [
|
||||
{
|
||||
test: /\.tsx?$/,
|
||||
loader: 'ts-loader',
|
||||
exclude: /node_modules/
|
||||
}
|
||||
]
|
||||
},
|
||||
optimization: {
|
||||
removeAvailableModules: true,
|
||||
@ -47,5 +52,12 @@ module.exports = (env, argv) => ({
|
||||
},
|
||||
devServer: {
|
||||
publicPath: "/dist",
|
||||
},
|
||||
resolve: {
|
||||
extensions: [
|
||||
".tsx",
|
||||
".ts",
|
||||
".js"
|
||||
]
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user