Merge in changes to successfully run webpack

This commit is contained in:
Steven Evans 2018-03-21 11:58:46 -04:00
commit fafab158a5
8 changed files with 86798 additions and 84349 deletions

1
.gitattributes vendored Normal file

@ -0,0 +1 @@
* text=auto

3
.gitignore vendored

@ -1,4 +1,5 @@
Changelog.txt
Netburner.txt
README.md
/node_modules
/node_modules
/dist/*.map

167210
dist/bundle.js vendored

File diff suppressed because one or more lines are too long

@ -790,7 +790,7 @@ oop.inherits(Mode, TextMode);
};
this.createWorker = function(session) {
var worker = new WorkerClient(["ace"], require("../worker/javascript"), "JavaScriptWorker");
var worker = new WorkerClient(["ace"], require("brace/worker/javascript"), "JavaScriptWorker");
worker.attachToDocument(session.getDocument());
worker.on("annotate", function(results) {

3840
package-lock.json generated

File diff suppressed because it is too large Load Diff

@ -1,37 +1,10 @@
{
"_from": "webpack",
"_id": "webpack@3.5.5",
"_inBundle": false,
"_integrity": "sha512-qeUx4nIbeLL53qqNTs3kObPBMkUVDrOjEfp/hTvMlx21qL2MsGNr8/tXCoX/lS12dLl9qtZaXv2qfBEctPScDg==",
"_location": "/webpack",
"_phantomChildren": {},
"_requested": {
"type": "tag",
"registry": true,
"raw": "webpack",
"name": "webpack",
"escapedName": "webpack",
"rawSpec": "",
"saveSpec": null,
"fetchSpec": "latest"
},
"_requiredBy": [
"#USER"
],
"_resolved": "https://registry.npmjs.org/webpack/-/webpack-3.5.5.tgz",
"_shasum": "3226f09fc8b3e435ff781e7af34f82b68b26996c",
"_spec": "webpack",
"_where": "C:\\Users\\danie",
"author": {
"name": "Tobias Koppers @sokra"
},
"bin": {
"webpack": "./bin/webpack.js"
"name": "Daniel Xie"
},
"bugs": {
"url": "https://github.com/webpack/webpack/issues"
"url": "https://github.com/danielyxie/bitburner/issues"
},
"bundleDependencies": false,
"dependencies": {
"acorn": "^5.0.0",
"acorn-dynamic-import": "^2.0.0",
@ -64,8 +37,7 @@
"webpack-sources": "^1.0.1",
"yargs": "^8.0.2"
},
"deprecated": false,
"description": "Packs CommonJs/AMD modules for the browser. Allows to split your codebase into multiple bundles, which can be loaded on demand. Support loaders to preprocess files, i.e. json, jsx, es7, css, less, ... and your custom stuff.",
"description": "A cyberpunk-themed incremental game",
"devDependencies": {
"beautify-lint": "^1.0.3",
"benchmark": "^2.1.1",
@ -104,28 +76,20 @@
"url-loader": "~0.5.0",
"val-loader": "^1.0.2",
"vm-browserify": "~0.0.0",
"webpack-cli": "^2.0.9",
"webpack": "^4.1.1",
"webpack-cli": "^2.0.12",
"webpack-dev-middleware": "^1.9.0",
"worker-loader": "^0.8.0"
},
"engines": {
"node": ">=4.3.0 <5.0.0 || >=5.10"
},
"files": [
"lib/",
"bin/",
"buildin/",
"hot/",
"web_modules/",
"schemas/"
],
"homepage": "https://github.com/webpack/webpack",
"license": "MIT",
"main": "lib/webpack.js",
"name": "webpack",
"homepage": "https://github.com/danielyxie/bitburner",
"license": "SEE LICENSE IN license.txt",
"name": "bitburner",
"repository": {
"type": "git",
"url": "git+https://github.com/webpack/webpack.git"
"url": "git+https://github.com/danielyxie/bitburner.git"
},
"scripts": {
"appveyor:benchmark": "npm run benchmark",
@ -148,6 +112,5 @@
"travis:lint": "npm run lint-files && npm run nsp",
"travis:test": "npm run cover:min"
},
"version": "3.5.5",
"web": "lib/webpack.web.js"
"version": "0.35.1"
}

@ -1,6 +1,6 @@
var ace = require('brace');
require('brace/mode/javascript');
require('brace/mode/netscript');
require('../netscript');
require('brace/theme/chaos');
require('brace/theme/chrome');
require('brace/theme/monokai');

@ -1,6 +1,8 @@
var path = require('path');
var webpack = require('webpack');
module.exports = {
mode: "development",
plugins: [
// http://stackoverflow.com/questions/29080148/expose-jquery-to-real-window-object-with-webpack
new webpack.ProvidePlugin({
@ -12,15 +14,35 @@ module.exports = {
$: "jquery"
}),
],
target: "web",
entry: "./src/engine.js",
devtool: "nosources-source-map",
output: {
path: __dirname + "/dist/",
filename: "bundle.js"
path: path.resolve(__dirname, "dist"),
filename: "bundle.js",
devtoolModuleFilenameTemplate: "[id]"
},
module: {
loaders: [
{ test: /\.css$/, loader: "style!css" },
rules: [
/* {
test: /\.css$/,
use: "style!css"
}*/
]
},
optimization: {
removeAvailableModules: true,
removeEmptyChunks: true,
mergeDuplicateChunks: true,
flagIncludedChunks: true,
occurrenceOrder: true,
sideEffects: true,
providedExports: false,
usedExports: false,
concatenateModules: false,
namedModules: false,
namedChunks: false,
minimize: false,
portableRecords: true
}
};