chore: dev build testing
This commit is contained in:
parent
b8782c565a
commit
533f719cca
5 changed files with 103 additions and 67 deletions
|
@ -1,12 +1,21 @@
|
|||
<!-- 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;}
|
||||
html,
|
||||
body {
|
||||
background-color: #000;
|
||||
height: 100%;
|
||||
margin: 0;
|
||||
}
|
||||
.dropup-content {
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
<link rel="stylesheet" href="/ssh/webssh2.css" />
|
||||
</head>
|
||||
<link href="webssh2.css" rel="stylesheet"></head>
|
||||
<body>
|
||||
<div class="box">
|
||||
<div id="header"></div>
|
||||
|
@ -21,5 +30,5 @@
|
|||
</div>
|
||||
</div>
|
||||
<script src="/ssh/webssh2.bundle.js" defer></script>
|
||||
</body>
|
||||
<script type="text/javascript" src="webssh2.bundle.js"></script></body>
|
||||
</html>
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -1,9 +1,18 @@
|
|||
<!-- 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;}
|
||||
html,
|
||||
body {
|
||||
background-color: #000;
|
||||
height: 100%;
|
||||
margin: 0;
|
||||
}
|
||||
.dropup-content {
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
<link rel="stylesheet" href="/ssh/webssh2.css" />
|
||||
</head>
|
||||
|
@ -20,6 +29,5 @@
|
|||
<div id="status"></div>
|
||||
</div>
|
||||
</div>
|
||||
<script src="/ssh/webssh2.bundle.js" defer></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -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"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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" }],
|
||||
}),
|
||||
},
|
||||
],
|
||||
},
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue