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

3
.gitignore vendored
View File

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

View File

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

View File

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

View File

@ -1,6 +1,6 @@
import CollabVMClient from './protocol/CollabVMClient.js'; import CollabVMClient from './protocol/CollabVMClient.js';
import VM from './protocol/VM.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 { Permissions, Rank } from './protocol/Permissions.js';
import { User } from './protocol/User.js'; import { User } from './protocol/User.js';
import TurnStatus from './protocol/TurnStatus.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. */ // "resolvePackageJsonExports": true, /* Use the package.json 'exports' field when resolving package imports. */
// "resolvePackageJsonImports": true, /* Use the package.json 'imports' field when resolving 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. */ // "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. */ // "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. */ // "noResolve": true, /* Disallow 'import's, 'require's or '<reference>'s from expanding the number of files TypeScript should add to a project. */