Merge in changes to successfully run webpack

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

1
.gitattributes vendored Normal file
View File

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

3
.gitignore vendored
View File

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

167210
dist/bundle.js vendored

File diff suppressed because one or more lines are too long

View File

@ -790,7 +790,7 @@ oop.inherits(Mode, TextMode);
}; };
this.createWorker = function(session) { 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.attachToDocument(session.getDocument());
worker.on("annotate", function(results) { worker.on("annotate", function(results) {

3840
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -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": { "author": {
"name": "Tobias Koppers @sokra" "name": "Daniel Xie"
},
"bin": {
"webpack": "./bin/webpack.js"
}, },
"bugs": { "bugs": {
"url": "https://github.com/webpack/webpack/issues" "url": "https://github.com/danielyxie/bitburner/issues"
}, },
"bundleDependencies": false,
"dependencies": { "dependencies": {
"acorn": "^5.0.0", "acorn": "^5.0.0",
"acorn-dynamic-import": "^2.0.0", "acorn-dynamic-import": "^2.0.0",
@ -64,8 +37,7 @@
"webpack-sources": "^1.0.1", "webpack-sources": "^1.0.1",
"yargs": "^8.0.2" "yargs": "^8.0.2"
}, },
"deprecated": false, "description": "A cyberpunk-themed incremental game",
"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.",
"devDependencies": { "devDependencies": {
"beautify-lint": "^1.0.3", "beautify-lint": "^1.0.3",
"benchmark": "^2.1.1", "benchmark": "^2.1.1",
@ -104,28 +76,20 @@
"url-loader": "~0.5.0", "url-loader": "~0.5.0",
"val-loader": "^1.0.2", "val-loader": "^1.0.2",
"vm-browserify": "~0.0.0", "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", "webpack-dev-middleware": "^1.9.0",
"worker-loader": "^0.8.0" "worker-loader": "^0.8.0"
}, },
"engines": { "engines": {
"node": ">=4.3.0 <5.0.0 || >=5.10" "node": ">=4.3.0 <5.0.0 || >=5.10"
}, },
"files": [ "homepage": "https://github.com/danielyxie/bitburner",
"lib/", "license": "SEE LICENSE IN license.txt",
"bin/", "name": "bitburner",
"buildin/",
"hot/",
"web_modules/",
"schemas/"
],
"homepage": "https://github.com/webpack/webpack",
"license": "MIT",
"main": "lib/webpack.js",
"name": "webpack",
"repository": { "repository": {
"type": "git", "type": "git",
"url": "git+https://github.com/webpack/webpack.git" "url": "git+https://github.com/danielyxie/bitburner.git"
}, },
"scripts": { "scripts": {
"appveyor:benchmark": "npm run benchmark", "appveyor:benchmark": "npm run benchmark",
@ -148,6 +112,5 @@
"travis:lint": "npm run lint-files && npm run nsp", "travis:lint": "npm run lint-files && npm run nsp",
"travis:test": "npm run cover:min" "travis:test": "npm run cover:min"
}, },
"version": "3.5.5", "version": "0.35.1"
"web": "lib/webpack.web.js"
} }

View File

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

View File

@ -1,6 +1,8 @@
var path = require('path');
var webpack = require('webpack'); var webpack = require('webpack');
module.exports = { module.exports = {
mode: "development",
plugins: [ plugins: [
// http://stackoverflow.com/questions/29080148/expose-jquery-to-real-window-object-with-webpack // http://stackoverflow.com/questions/29080148/expose-jquery-to-real-window-object-with-webpack
new webpack.ProvidePlugin({ new webpack.ProvidePlugin({
@ -12,15 +14,35 @@ module.exports = {
$: "jquery" $: "jquery"
}), }),
], ],
target: "web",
entry: "./src/engine.js", entry: "./src/engine.js",
devtool: "nosources-source-map",
output: { output: {
path: __dirname + "/dist/", path: path.resolve(__dirname, "dist"),
filename: "bundle.js" filename: "bundle.js",
devtoolModuleFilenameTemplate: "[id]"
}, },
module: { module: {
loaders: [ rules: [
{ test: /\.css$/, loader: "style!css" }, /* {
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
} }
}; };