chore: dev build testing

This commit is contained in:
Bill Church 2024-07-10 13:09:24 +00:00
parent b8782c565a
commit 533f719cca
No known key found for this signature in database
5 changed files with 103 additions and 67 deletions

View file

@ -1,12 +1,21 @@
<!-- Version Version 0.2.12 - 2024-07-10T13:04:57.896Z - b8782c5 -->
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<title>WebSSH2</title> <title>WebSSH2</title>
<style> <style>
html, body {background-color: #000;height: 100%;margin: 0;}.dropup-content {display: none;} html,
body {
background-color: #000;
height: 100%;
margin: 0;
}
.dropup-content {
display: none;
}
</style> </style>
<link rel="stylesheet" href="/ssh/webssh2.css" /> <link rel="stylesheet" href="/ssh/webssh2.css" />
</head> <link href="webssh2.css" rel="stylesheet"></head>
<body> <body>
<div class="box"> <div class="box">
<div id="header"></div> <div id="header"></div>
@ -21,5 +30,5 @@
</div> </div>
</div> </div>
<script src="/ssh/webssh2.bundle.js" defer></script> <script src="/ssh/webssh2.bundle.js" defer></script>
</body> <script type="text/javascript" src="webssh2.bundle.js"></script></body>
</html> </html>

View file

@ -1,3 +1,4 @@
/*! Version 0.2.12 - 2024-07-10T13:04:57.892Z */
/** /**
* Copyright (c) 2014 The xterm.js authors. All rights reserved. * Copyright (c) 2014 The xterm.js authors. All rights reserved.
* Copyright (c) 2012-2013, Christopher Jeffrey (MIT License) * Copyright (c) 2012-2013, Christopher Jeffrey (MIT License)

View file

@ -1,9 +1,18 @@
<!-- Version <%= htmlWebpackPlugin.options.version %> -->
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<title>WebSSH2</title> <title>WebSSH2</title>
<style> <style>
html, body {background-color: #000;height: 100%;margin: 0;}.dropup-content {display: none;} html,
body {
background-color: #000;
height: 100%;
margin: 0;
}
.dropup-content {
display: none;
}
</style> </style>
<link rel="stylesheet" href="/ssh/webssh2.css" /> <link rel="stylesheet" href="/ssh/webssh2.css" />
</head> </head>
@ -20,6 +29,5 @@
<div id="status"></div> <div id="status"></div>
</div> </div>
</div> </div>
<script src="/ssh/webssh2.bundle.js" defer></script>
</body> </body>
</html> </html>

View file

@ -74,6 +74,7 @@
"css-loader": "^2.1.0", "css-loader": "^2.1.0",
"extract-text-webpack-plugin": "^4.0.0-beta.0", "extract-text-webpack-plugin": "^4.0.0-beta.0",
"file-loader": "^3.0.1", "file-loader": "^3.0.1",
"html-webpack-plugin": "^3.2.0",
"nodaemon": "0.0.5", "nodaemon": "0.0.5",
"postcss-discard-comments": "^4.0.1", "postcss-discard-comments": "^4.0.1",
"snazzy": "^8.0.0", "snazzy": "^8.0.0",
@ -85,6 +86,7 @@
"webpack-cli": "^3.2.1", "webpack-cli": "^3.2.1",
"webpack-merge": "^4.2.1", "webpack-merge": "^4.2.1",
"webpack-stream": "^5.2.1", "webpack-stream": "^5.2.1",
"xterm": "^3.10.1" "xterm": "^3.10.1",
"zip-webpack-plugin": "^4.0.1"
} }
} }

View file

@ -1,41 +1,57 @@
const webpack = require('webpack') const webpack = require("webpack");
const path = require('path') const { BannerPlugin } = require("webpack");
const CleanWebpackPlugin = require('clean-webpack-plugin') const HtmlWebpackPlugin = require("html-webpack-plugin");
const CopyWebpackPlugin = require('copy-webpack-plugin') const path = require("path");
const ExtractTextPlugin = require('extract-text-webpack-plugin') const CopyWebpackPlugin = require("copy-webpack-plugin");
const CleanWebpackPlugin = require("clean-webpack-plugin");
const ExtractTextPlugin = require("extract-text-webpack-plugin");
const packageJson = require("../package.json"); // Load package.json
const commitHash = require("child_process")
.execSync("git rev-parse --short HEAD")
.toString()
.trim();
module.exports = { module.exports = {
context: path.resolve('__dirname', '../'), context: path.resolve(__dirname, "../"),
entry: { entry: {
webssh2: './client/src/js/index.js' webssh2: "./client/src/js/index.js",
}, },
plugins: [ plugins: [
new CleanWebpackPlugin(['client/public'], { new BannerPlugin({
root: path.resolve('__dirname', '../'), banner: `Version ${packageJson.version} - ${new Date().toISOString()}`,
verbose: true include: /\.(js|css|html|htm)$/,
}),
new CleanWebpackPlugin(["client/public"], {
root: path.resolve("__dirname", "../"),
verbose: true,
}),
new HtmlWebpackPlugin({
template: "./client/src/client.htm", // Path to your source template
filename: "client.htm", // Optional: output file name, defaults to index.html
minify: false,
scriptLoading: "blocking",
version: `Version ${
packageJson.version
} - ${new Date().toISOString()} - ${commitHash}`,
}), }),
new CopyWebpackPlugin([ new CopyWebpackPlugin([
'./client/src/client.htm', { from: "./client/src/favicon.ico", to: "favicon.ico" },
'./client/src/favicon.ico'
]), ]),
new ExtractTextPlugin('[name].css') new ExtractTextPlugin("[name].css"),
], ],
output: { output: {
filename: '[name].bundle.js', filename: "[name].bundle.js",
path: path.resolve(__dirname, '../client/public') path: path.resolve(__dirname, "../client/public"),
}, },
module: { module: {
rules: [ rules: [
{ {
test: /\.css$/, test: /\.css$/,
use: ExtractTextPlugin.extract({ use: ExtractTextPlugin.extract({
fallback: 'style-loader', fallback: "style-loader",
use: [ use: [{ loader: "css-loader" }],
{ }),
loader: 'css-loader' },
} ],
] },
}) };
}
]
}
}