Remove git module in favor of NPM package.

This commit is contained in:
David Reed 2022-09-12 20:36:03 -04:00
parent 32365a9afd
commit bb7845faef
6 changed files with 16 additions and 21 deletions

3
.gitmodules vendored
View file

@ -1,3 +0,0 @@
[submodule "static"]
path = static
url = https://github.com/titaniumnetwork-dev/ultraviolet-site.git

10
main.sh
View file

@ -2,12 +2,4 @@
# Set this to 1 to automatically attempt a fix when an error occurs while running npm start.
fix=0
# Stuff to do at first run(submodule, npm install).
if [[ -d "static" && -n "$(find static -prune -empty 2>/dev/null)" ]] || [[ ! -d "static" ]]; then
npm install
git submodule update --init --recursive
fi
npm start || [[ $fix = 1 ]] && npm install && npm update && git submodule update --init --recursive
npm start || [[ $fix = 1 ]] && npm install && npm start

12
package-lock.json generated
View file

@ -10,7 +10,8 @@
"license": "GPL-3.0-or-later",
"dependencies": {
"@tomphttp/bare-server-node": "^1.0.2-beta-readme2",
"serve-static": "^1.15.0"
"serve-static": "^1.15.0",
"ultraviolet-static": "https://github.com/titaniumnetwork-development/Ultraviolet-Static/releases/download/v1.0.0/ultraviolet-static-1.0.0.tgz"
},
"devDependencies": {
"eslint": "^8.23.0",
@ -1525,6 +1526,11 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/ultraviolet-static": {
"version": "1.0.0",
"resolved": "https://github.com/titaniumnetwork-development/Ultraviolet-Static/releases/download/v1.0.0/ultraviolet-static-1.0.0.tgz",
"integrity": "sha512-HrgerFmdzz991mbg+PcTlv7fBsOznSF+pIY0Nmn52IhXU1i+d7tlVYt9d6gNAeU7xbhMVJ8jJjgy8ZIZ2/NIUw=="
},
"node_modules/uri-js": {
"version": "4.4.1",
"resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz",
@ -2660,6 +2666,10 @@
"integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==",
"dev": true
},
"ultraviolet-static": {
"version": "https://github.com/titaniumnetwork-development/Ultraviolet-Static/releases/download/v1.0.0/ultraviolet-static-1.0.0.tgz",
"integrity": "sha512-HrgerFmdzz991mbg+PcTlv7fBsOznSF+pIY0Nmn52IhXU1i+d7tlVYt9d6gNAeU7xbhMVJ8jJjgy8ZIZ2/NIUw=="
},
"uri-js": {
"version": "4.4.1",
"resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz",

View file

@ -13,7 +13,8 @@
"license": "GPL-3.0-or-later",
"dependencies": {
"@tomphttp/bare-server-node": "^1.0.2-beta-readme2",
"serve-static": "^1.15.0"
"serve-static": "^1.15.0",
"ultraviolet-static": "https://github.com/titaniumnetwork-development/Ultraviolet-Static/releases/download/v1.0.0/ultraviolet-static-1.0.0.tgz"
},
"devDependencies": {
"eslint": "^8.23.0",

View file

@ -1,14 +1,10 @@
import createServer from "@tomphttp/bare-server-node";
import { fileURLToPath } from "url";
import http from "http";
import serveStatic from "serve-static";
import { publicPath } from "ultraviolet-static";
const bare = createServer("/bare/");
const serve = serveStatic(
fileURLToPath(new URL("../static/", import.meta.url)),
{ fallthrough: false }
);
const serve = serveStatic(publicPath, { fallthrough: false });
const server = http.createServer();
server.on("request", (req, res) => {

1
static

@ -1 +0,0 @@
Subproject commit f7c4f10705c228a79da350c3d311c4b1fb2f7c97