mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-29 19:13:49 +01:00
Merge pull request #2825 from MartinFournier/chore/move-bundle
Move main bundle output to ./dist subfolder
This commit is contained in:
commit
8c9be1667f
1
.gitignore
vendored
1
.gitignore
vendored
@ -5,7 +5,6 @@ Netburner.txt
|
|||||||
/doc/build
|
/doc/build
|
||||||
/node_modules
|
/node_modules
|
||||||
/electron/node_modules
|
/electron/node_modules
|
||||||
/dist/*.map
|
|
||||||
/test/*.map
|
/test/*.map
|
||||||
/test/*.bundle.*
|
/test/*.bundle.*
|
||||||
/test/*.css
|
/test/*.css
|
||||||
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
BIN
dist/favicon.ico
vendored
Normal file
BIN
dist/favicon.ico
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 15 KiB |
20
dist/main.bundle.js
vendored
Normal file
20
dist/main.bundle.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
dist/main.bundle.js.map
vendored
Normal file
1
dist/main.bundle.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
36
dist/vendor.bundle.js
vendored
36
dist/vendor.bundle.js
vendored
File diff suppressed because one or more lines are too long
1
dist/vendor.bundle.js.map
vendored
Normal file
1
dist/vendor.bundle.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
@ -73,5 +73,5 @@
|
|||||||
<link rel="shortcut icon" href="favicon.ico"></head>
|
<link rel="shortcut icon" href="favicon.ico"></head>
|
||||||
<body>
|
<body>
|
||||||
<div id="root"/>
|
<div id="root"/>
|
||||||
<script type="text/javascript" src="dist/vendor.bundle.js"></script><script type="text/javascript" src="main.bundle.js"></script></body>
|
<script type="text/javascript" src="dist/vendor.bundle.js"></script><script type="text/javascript" src="dist/main.bundle.js"></script></body>
|
||||||
</html>
|
</html>
|
||||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
23
package.sh
23
package.sh
@ -3,27 +3,10 @@
|
|||||||
# Clear out any files remaining from old builds
|
# Clear out any files remaining from old builds
|
||||||
rm -rf .package
|
rm -rf .package
|
||||||
|
|
||||||
mkdir -p .package/dist/src/ThirdParty || true
|
mkdir -p .package/dist/
|
||||||
mkdir -p .package/src/ThirdParty || true
|
|
||||||
mkdir -p .package/node_modules || true
|
|
||||||
|
|
||||||
cp index.html .package
|
|
||||||
cp -r electron/* .package
|
cp -r electron/* .package
|
||||||
cp -r dist/ext .package/dist
|
cp -r dist .package
|
||||||
cp -r dist/icons .package/dist
|
cp index.html .package/index.html
|
||||||
cp -r dist/images .package/dist
|
|
||||||
|
|
||||||
# The css files
|
|
||||||
cp dist/vendor.css .package/dist
|
|
||||||
cp main.css .package/main.css
|
|
||||||
|
|
||||||
# The js files.
|
|
||||||
cp dist/vendor.bundle.js .package/dist/vendor.bundle.js
|
|
||||||
cp main.bundle.js .package/main.bundle.js
|
|
||||||
|
|
||||||
# Source maps
|
|
||||||
cp dist/vendor.bundle.js.map .package/dist/vendor.bundle.js.map
|
|
||||||
cp main.bundle.js.map .package/main.bundle.js.map
|
|
||||||
|
|
||||||
# Install electron sub-dependencies
|
# Install electron sub-dependencies
|
||||||
cd electron
|
cd electron
|
||||||
|
@ -63,7 +63,8 @@ module.exports = (env, argv) => {
|
|||||||
new HtmlWebpackPlugin({
|
new HtmlWebpackPlugin({
|
||||||
title: "Bitburner",
|
title: "Bitburner",
|
||||||
template: "src/index.html",
|
template: "src/index.html",
|
||||||
favicon: "favicon.ico",
|
filename: "../index.html",
|
||||||
|
favicon: "assets/favicon.ico",
|
||||||
googleAnalytics: {
|
googleAnalytics: {
|
||||||
trackingId: "UA-100157497-1",
|
trackingId: "UA-100157497-1",
|
||||||
},
|
},
|
||||||
@ -136,7 +137,7 @@ module.exports = (env, argv) => {
|
|||||||
// },
|
// },
|
||||||
entry: entry,
|
entry: entry,
|
||||||
output: {
|
output: {
|
||||||
path: path.resolve(__dirname, "./"),
|
path: path.resolve(__dirname, outputDirectory),
|
||||||
filename: "[name].bundle.js",
|
filename: "[name].bundle.js",
|
||||||
},
|
},
|
||||||
module: {
|
module: {
|
||||||
@ -161,7 +162,7 @@ module.exports = (env, argv) => {
|
|||||||
loader: 'file-loader',
|
loader: 'file-loader',
|
||||||
options: {
|
options: {
|
||||||
name: '[contenthash].[ext]',
|
name: '[contenthash].[ext]',
|
||||||
outputPath: 'dist/images',
|
outputPath: 'images',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
@ -184,7 +185,7 @@ module.exports = (env, argv) => {
|
|||||||
cacheGroups: {
|
cacheGroups: {
|
||||||
vendor: {
|
vendor: {
|
||||||
test: /[\\/]node_modules[\\/]/,
|
test: /[\\/]node_modules[\\/]/,
|
||||||
name: `${outputDirectory}/vendor`,
|
name: `vendor`,
|
||||||
chunks: "all",
|
chunks: "all",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user