Initial support for configuring the disk via a self-contained config file

This commit is contained in:
Alessandro Pignotti 2024-10-05 12:36:59 +02:00
parent 274931dc12
commit 92edbb7b96
5 changed files with 31 additions and 0 deletions

1
diskConfig.cloud.js Normal file
View file

@ -0,0 +1 @@
export const imageUrl = "wss://disks-staging.webvm.io/debian_large_20230522_5044875331.ext2";

18
package-lock.json generated
View file

@ -11,6 +11,7 @@
"@fortawesome/fontawesome-free": "^6.6.0",
"@leaningtech/cheerpx": "latest",
"@oddbird/popover-polyfill": "^0.4.4",
"@rollup/plugin-alias": "^5.1.1",
"@rollup/plugin-commonjs": "^24.0.0",
"@rollup/plugin-node-resolve": "^15.0.0",
"@rollup/plugin-terser": "^0.4.0",
@ -593,6 +594,23 @@
"integrity": "sha512-8LduaNlMZGwdZ6qWrKlfa+2M4gahzFkprZiAt2TF8uS0qQgBizKXpXURqvTJ4WtmupWxaLqjRb2UCTe72mu+Aw==",
"dev": true
},
"node_modules/@rollup/plugin-alias": {
"version": "5.1.1",
"resolved": "https://registry.npmjs.org/@rollup/plugin-alias/-/plugin-alias-5.1.1.tgz",
"integrity": "sha512-PR9zDb+rOzkRb2VD+EuKB7UC41vU5DIwZ5qqCpk0KJudcWAyi8rvYOhS7+L5aZCspw1stTViLgN5v6FF1p5cgQ==",
"dev": true,
"engines": {
"node": ">=14.0.0"
},
"peerDependencies": {
"rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0"
},
"peerDependenciesMeta": {
"rollup": {
"optional": true
}
}
},
"node_modules/@rollup/plugin-commonjs": {
"version": "24.1.0",
"resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-24.1.0.tgz",

View file

@ -10,6 +10,7 @@
"@fortawesome/fontawesome-free": "^6.6.0",
"@leaningtech/cheerpx": "latest",
"@oddbird/popover-polyfill": "^0.4.4",
"@rollup/plugin-alias": "^5.1.1",
"@rollup/plugin-commonjs": "^24.0.0",
"@rollup/plugin-node-resolve": "^15.0.0",
"@rollup/plugin-terser": "^0.4.0",

View file

@ -1,15 +1,20 @@
import copy from 'rollup-plugin-copy';
import svelte from 'rollup-plugin-svelte';
import postcss from 'rollup-plugin-postcss';
import alias from '@rollup/plugin-alias'
import commonjs from '@rollup/plugin-commonjs';
import terser from '@rollup/plugin-terser';
import resolve from '@rollup/plugin-node-resolve';
import css from 'rollup-plugin-css-only';
import autoprefixer from 'autoprefixer';
import path from 'path';
import url from 'url';
import tailwindcss from 'tailwindcss';
const production = !process.env.ROLLUP_WATCH;
const __dirname = path.dirname(url.fileURLToPath(import.meta.url));
export default {
input: 'src/main.js',
output: {
@ -19,6 +24,11 @@ export default {
file: 'build/bundle.js'
},
plugins: [
alias({
entries: {
'diskConfig': path.resolve(__dirname, 'diskConfig.cloud.js')
}
}),
svelte({
compilerOptions: {
// enable run-time checks when not in production

View file

@ -6,6 +6,7 @@
import Nav from 'labs/packages/global-navbar/src/Nav.svelte';
import SideBar from './SideBar.svelte';
import * as CheerpX from '@leaningtech/cheerpx';
import { imageUrl } from 'diskConfig'
var term = new Terminal({cursorBlink:true, convertEol:true, fontFamily:"monospace", fontWeight: 400, fontWeightBold: 700});
var fitAddon = new FitAddon();