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,25 +1,34 @@
<!-- Version Version 0.2.12 - 2024-07-10T13:04:57.896Z - b8782c5 -->
<!DOCTYPE html>
<html>
<head>
<title>WebSSH2</title>
<style>
html, body {background-color: #000;height: 100%;margin: 0;}.dropup-content {display: none;}
</style>
<link rel="stylesheet" href="/ssh/webssh2.css" />
</head>
<body>
<div class="box">
<div id="header"></div>
<div id="terminal-container" class="terminal"></div>
<div id="bottomdiv">
<div class="dropup" id="menu">
<i class="fas fa-bars fa-fw"></i> Menu
<div id="dropupContent" class="dropup-content"></div>
<head>
<title>WebSSH2</title>
<style>
html,
body {
background-color: #000;
height: 100%;
margin: 0;
}
.dropup-content {
display: none;
}
</style>
<link rel="stylesheet" href="/ssh/webssh2.css" />
<link href="webssh2.css" rel="stylesheet"></head>
<body>
<div class="box">
<div id="header"></div>
<div id="terminal-container" class="terminal"></div>
<div id="bottomdiv">
<div class="dropup" id="menu">
<i class="fas fa-bars fa-fw"></i> Menu
<div id="dropupContent" class="dropup-content"></div>
</div>
<div id="footer"></div>
<div id="status"></div>
</div>
<div id="footer"></div>
<div id="status"></div>
</div>
</div>
<script src="/ssh/webssh2.bundle.js" defer></script>
</body>
<script src="/ssh/webssh2.bundle.js" defer></script>
<script type="text/javascript" src="webssh2.bundle.js"></script></body>
</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) 2012-2013, Christopher Jeffrey (MIT License)

View file

@ -1,25 +1,33 @@
<!-- Version <%= htmlWebpackPlugin.options.version %> -->
<!DOCTYPE html>
<html>
<head>
<title>WebSSH2</title>
<style>
html, body {background-color: #000;height: 100%;margin: 0;}.dropup-content {display: none;}
</style>
<link rel="stylesheet" href="/ssh/webssh2.css" />
</head>
<body>
<div class="box">
<div id="header"></div>
<div id="terminal-container" class="terminal"></div>
<div id="bottomdiv">
<div class="dropup" id="menu">
<i class="fas fa-bars fa-fw"></i> Menu
<div id="dropupContent" class="dropup-content"></div>
<head>
<title>WebSSH2</title>
<style>
html,
body {
background-color: #000;
height: 100%;
margin: 0;
}
.dropup-content {
display: none;
}
</style>
<link rel="stylesheet" href="/ssh/webssh2.css" />
</head>
<body>
<div class="box">
<div id="header"></div>
<div id="terminal-container" class="terminal"></div>
<div id="bottomdiv">
<div class="dropup" id="menu">
<i class="fas fa-bars fa-fw"></i> Menu
<div id="dropupContent" class="dropup-content"></div>
</div>
<div id="footer"></div>
<div id="status"></div>
</div>
<div id="footer"></div>
<div id="status"></div>
</div>
</div>
<script src="/ssh/webssh2.bundle.js" defer></script>
</body>
</body>
</html>

View file

@ -74,6 +74,7 @@
"css-loader": "^2.1.0",
"extract-text-webpack-plugin": "^4.0.0-beta.0",
"file-loader": "^3.0.1",
"html-webpack-plugin": "^3.2.0",
"nodaemon": "0.0.5",
"postcss-discard-comments": "^4.0.1",
"snazzy": "^8.0.0",
@ -85,6 +86,7 @@
"webpack-cli": "^3.2.1",
"webpack-merge": "^4.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 path = require('path')
const CleanWebpackPlugin = require('clean-webpack-plugin')
const CopyWebpackPlugin = require('copy-webpack-plugin')
const ExtractTextPlugin = require('extract-text-webpack-plugin')
const webpack = require("webpack");
const { BannerPlugin } = require("webpack");
const HtmlWebpackPlugin = require("html-webpack-plugin");
const path = require("path");
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 = {
context: path.resolve('__dirname', '../'),
context: path.resolve(__dirname, "../"),
entry: {
webssh2: './client/src/js/index.js'
webssh2: "./client/src/js/index.js",
},
plugins: [
new CleanWebpackPlugin(['client/public'], {
root: path.resolve('__dirname', '../'),
verbose: true
new BannerPlugin({
banner: `Version ${packageJson.version} - ${new Date().toISOString()}`,
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([
'./client/src/client.htm',
'./client/src/favicon.ico'
{ from: "./client/src/favicon.ico", to: "favicon.ico" },
]),
new ExtractTextPlugin('[name].css')
new ExtractTextPlugin("[name].css"),
],
output: {
filename: '[name].bundle.js',
path: path.resolve(__dirname, '../client/public')
filename: "[name].bundle.js",
path: path.resolve(__dirname, "../client/public"),
},
module: {
rules: [
{
test: /\.css$/,
use: ExtractTextPlugin.extract({
fallback: 'style-loader',
use: [
{
loader: 'css-loader'
}
]
})
}
]
}
}
fallback: "style-loader",
use: [{ loader: "css-loader" }],
}),
},
],
},
};