Switch to using parcel json imports instead of Config.ts

This commit is contained in:
Elijah R 2024-04-10 16:33:54 -04:00
parent fd34df65ca
commit c78298345c
5 changed files with 13 additions and 12 deletions

1
.gitignore vendored
View file

@ -1,3 +1,4 @@
node_modules/
dist/
.parcel-cache/
config.json

View file

@ -6,7 +6,7 @@ The CollabVM Web App is the viewer for the CollabVM Server.
## Building
Edit Config.ts to your needs, then:
Copy config.example.json to config.json and edit to your needs, then:
## yarn
- `yarn`

View file

@ -1,6 +1,6 @@
export const Config = {
ChatSound: "//computernewb.com/collab-vm/notify.ogg",
ServerAddresses: [
{
"ChatSound": "//computernewb.com/collab-vm/notify.ogg",
"ServerAddresses": [
"wss://computernewb.com/collab-vm/vm0",
"wss://computernewb.com/collab-vm/vm1",
"wss://computernewb.com/collab-vm/vm2",
@ -9,10 +9,10 @@ export const Config = {
"wss://computernewb.com/collab-vm/vm5",
"wss://computernewb.com/collab-vm/vm6",
"wss://computernewb.com/collab-vm/vm7",
"wss://computernewb.com/collab-vm/vm8",
"wss://computernewb.com/collab-vm/vm8"
],
Auth: {
Enabled: false,
APIEndpoint: "http://127.0.0.1:5858"
"Auth": {
"Enabled": false,
"APIEndpoint": "http://127.0.0.1:5858"
}
}

View file

@ -1,6 +1,6 @@
import CollabVMClient from './protocol/CollabVMClient.js';
import VM from './protocol/VM.js';
import { Config } from '../../Config.js';
import Config from '../../config.json';
import { Permissions, Rank } from './protocol/Permissions.js';
import { User } from './protocol/User.js';
import TurnStatus from './protocol/TurnStatus.js';

View file

@ -41,7 +41,7 @@
// "resolvePackageJsonExports": true, /* Use the package.json 'exports' field when resolving package imports. */
// "resolvePackageJsonImports": true, /* Use the package.json 'imports' field when resolving imports. */
// "customConditions": [], /* Conditions to set in addition to the resolver-specific defaults when resolving imports. */
// "resolveJsonModule": true, /* Enable importing .json files. */
"resolveJsonModule": true, /* Enable importing .json files. */
// "allowArbitraryExtensions": true, /* Enable importing files with any extension, provided a declaration file is present. */
// "noResolve": true, /* Disallow 'import's, 'require's or '<reference>'s from expanding the number of files TypeScript should add to a project. */