Sveltekit 2 migration + sveltestrap

This commit is contained in:
nemunaire 2024-01-05 11:02:38 +01:00
parent bc8796a2e0
commit 54d32e113c
41 changed files with 523 additions and 288 deletions

View File

@ -18,7 +18,6 @@ steps:
- mkdir deploy
- cd ui
- npm install --network-timeout=100000
- sed -i 's!@popperjs/core/dist/esm/popper!@popperjs/core!' node_modules/sveltestrap/src/*.js node_modules/sveltestrap/src/*.svelte
- npm run build
- tar chjf ../deploy/static.tar.bz2 build

View File

@ -5,7 +5,6 @@ WORKDIR /ui
COPY ui/ .
RUN npm install --network-timeout=100000 && \
sed -i 's!@popperjs/core/dist/esm/popper!@popperjs/core!' node_modules/sveltestrap/src/*.js node_modules/sveltestrap/src/*.svelte && \
npm run build

703
ui/package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -23,8 +23,8 @@
"eslint": "^8.0.0",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-svelte": "^2.33.0",
"prettier": "^3.0.0",
"prettier-plugin-svelte": "^2.10.1",
"prettier": "^3.1.1",
"prettier-plugin-svelte": "^3.1.2",
"svelte": "^4.0.0",
"svelte-check": "^3.4.3",
"svelte-preprocess": "^5.0.3",

View File

@ -3,7 +3,7 @@
Toast,
ToastBody,
ToastHeader,
} from 'sveltestrap';
} from '@sveltestrap/sveltestrap';
import { ToastsStore } from '$lib/stores/toasts';
</script>

View File

@ -5,7 +5,7 @@
Button,
Icon,
Spinner,
} from 'sveltestrap';
} from '@sveltestrap/sveltestrap';
import { actions } from '$lib/stores/actions';

View File

@ -5,7 +5,7 @@
Button,
Icon,
Spinner,
} from 'sveltestrap';
} from '@sveltestrap/sveltestrap';
import DateRangeFormat from '$lib/components/DateRangeFormat.svelte';
import { alarmsExceptions } from '$lib/stores/alarmexceptions';

View File

@ -5,7 +5,7 @@
Button,
Icon,
Spinner,
} from 'sveltestrap';
} from '@sveltestrap/sveltestrap';
import { weekdayStr } from '$lib/alarmrepeated';
import { alarmsRepeated } from '$lib/stores/alarmrepeated';

View File

@ -5,7 +5,7 @@
Button,
Icon,
Spinner,
} from 'sveltestrap';
} from '@sveltestrap/sveltestrap';
import DateFormat from '$lib/components/DateFormat.svelte';
import { alarmsSingle } from '$lib/stores/alarmsingle';

View File

@ -11,7 +11,7 @@
ListGroupItem,
Row,
Icon,
} from 'sveltestrap';
} from '@sveltestrap/sveltestrap';
import { actions_idx } from '$lib/stores/actions';

View File

@ -5,7 +5,7 @@
ListGroup,
ListGroupItem,
Icon,
} from 'sveltestrap';
} from '@sveltestrap/sveltestrap';
export let awakingList = [
{

View File

@ -6,7 +6,7 @@
ListGroup,
ListGroupItem,
Icon,
} from 'sveltestrap';
} from '@sveltestrap/sveltestrap';
export let routinesStats = [
{

View File

@ -4,7 +4,7 @@
CardHeader,
CardBody,
Icon,
} from 'sveltestrap';
} from '@sveltestrap/sveltestrap';
</script>
<Card>

View File

@ -3,7 +3,7 @@
import {
Input,
} from 'sveltestrap';
} from '@sveltestrap/sveltestrap';
export let format = 'YYYY-MM-DD HH:mm';
export let date = new Date();

View File

@ -6,7 +6,7 @@
Button,
Icon,
Spinner,
} from 'sveltestrap';
} from '@sveltestrap/sveltestrap';
import { gongs } from '$lib/stores/gongs';

View File

@ -8,7 +8,7 @@
Nav,
NavItem,
NavLink,
} from 'sveltestrap';
} from '@sveltestrap/sveltestrap';
const version = fetch('api/version', {headers: {'Accept': 'application/json'}}).then((res) => res.json())

View File

@ -3,7 +3,7 @@
Toast,
ToastBody,
ToastHeader,
} from 'sveltestrap';
} from '@sveltestrap/sveltestrap';
import { ToastsStore } from '$lib/stores/toasts';
</script>

View File

@ -6,7 +6,7 @@
Button,
Icon,
Spinner,
} from 'sveltestrap';
} from '@sveltestrap/sveltestrap';
import { tracks } from '$lib/stores/tracks';

View File

@ -4,7 +4,7 @@
import {
//Styles,
} from 'sveltestrap';
} from '@sveltestrap/sveltestrap';
import Header from '$lib/components/Header.svelte';
import Toaster from '$lib/components/Toaster.svelte';

View File

@ -3,7 +3,7 @@
Container,
Icon,
Spinner,
} from 'sveltestrap';
} from '@sveltestrap/sveltestrap';
import CycleCounter from '$lib/components/CycleCounter.svelte';
import DateFormat from '$lib/components/DateFormat.svelte';

View File

@ -4,7 +4,7 @@
Container,
Row,
Icon,
} from 'sveltestrap';
} from '@sveltestrap/sveltestrap';
import AlarmSingleList from '$lib/components/AlarmSingleList.svelte';
import AlarmRepeatedList from '$lib/components/AlarmRepeatedList.svelte';

View File

@ -5,7 +5,7 @@
Container,
Row,
Icon,
} from 'sveltestrap';
} from '@sveltestrap/sveltestrap';
import { page } from '$app/stores';

View File

@ -3,7 +3,7 @@
import {
Container,
} from 'sveltestrap';
} from '@sveltestrap/sveltestrap';
import AlarmSingleList from '$lib/components/AlarmSingleList.svelte';
import AlarmRepeatedList from '$lib/components/AlarmRepeatedList.svelte';

View File

@ -9,7 +9,7 @@
ListGroupItem,
Row,
Spinner,
} from 'sveltestrap';
} from '@sveltestrap/sveltestrap';
import { goto } from '$app/navigation';
import { page } from '$app/stores';

View File

@ -13,7 +13,7 @@
Label,
Row,
Spinner,
} from 'sveltestrap';
} from '@sveltestrap/sveltestrap';
import DateTimeInput from '$lib/components/DateTimeInput.svelte';
import { AlarmSingle } from '$lib/alarmsingle';

View File

@ -4,7 +4,7 @@
Container,
Row,
Icon,
} from 'sveltestrap';
} from '@sveltestrap/sveltestrap';
import CardStatAlarms from '$lib/components/CardStatAlarms.svelte';
import CardStatTimeAwaking from '$lib/components/CardStatTimeAwaking.svelte';

View File

@ -4,7 +4,7 @@
Container,
Row,
Icon,
} from 'sveltestrap';
} from '@sveltestrap/sveltestrap';
import MusiksLastPlayedList from '$lib/components/MusiksLastPlayedList.svelte';
import TrackList from '$lib/components/TrackList.svelte';

View File

@ -5,7 +5,7 @@
Container,
Row,
Icon,
} from 'sveltestrap';
} from '@sveltestrap/sveltestrap';
import GongsList from '$lib/components/GongsList.svelte';
</script>

View File

@ -2,7 +2,7 @@
import {
Container,
Icon,
} from 'sveltestrap';
} from '@sveltestrap/sveltestrap';
import TrackList from '$lib/components/TrackList.svelte';
</script>

View File

@ -10,7 +10,7 @@
ListGroup,
ListGroupItem,
Spinner,
} from 'sveltestrap';
} from '@sveltestrap/sveltestrap';
import { getGong } from '$lib/gong';
import { gongs } from '$lib/stores/gongs';

View File

@ -10,7 +10,7 @@
ListGroup,
ListGroupItem,
Spinner,
} from 'sveltestrap';
} from '@sveltestrap/sveltestrap';
import { gongs } from '$lib/stores/gongs';
import { uploadGong } from '$lib/gong';

View File

@ -5,7 +5,7 @@
Container,
Row,
Icon,
} from 'sveltestrap';
} from '@sveltestrap/sveltestrap';
import TrackList from '$lib/components/TrackList.svelte';
</script>

View File

@ -2,7 +2,7 @@
import {
Container,
Icon,
} from 'sveltestrap';
} from '@sveltestrap/sveltestrap';
import TrackList from '$lib/components/TrackList.svelte';
</script>

View File

@ -10,7 +10,7 @@
ListGroup,
ListGroupItem,
Spinner,
} from 'sveltestrap';
} from '@sveltestrap/sveltestrap';
import { getTrack } from '$lib/track';
import { tracks } from '$lib/stores/tracks';

View File

@ -10,7 +10,7 @@
ListGroup,
ListGroupItem,
Spinner,
} from 'sveltestrap';
} from '@sveltestrap/sveltestrap';
import { tracks } from '$lib/stores/tracks';
import { uploadTrack } from '$lib/track';

View File

@ -6,7 +6,7 @@
Icon,
Row,
Spinner,
} from 'sveltestrap';
} from '@sveltestrap/sveltestrap';
import { routines } from '$lib/stores/routines';

View File

@ -5,7 +5,7 @@
Container,
Row,
Icon,
} from 'sveltestrap';
} from '@sveltestrap/sveltestrap';
import ActionList from '$lib/components/ActionList.svelte';
</script>

View File

@ -2,7 +2,7 @@
import {
Container,
Icon,
} from 'sveltestrap';
} from '@sveltestrap/sveltestrap';
import ActionList from '$lib/components/ActionList.svelte';
</script>

View File

@ -8,7 +8,7 @@
ListGroup,
ListGroupItem,
Spinner,
} from 'sveltestrap';
} from '@sveltestrap/sveltestrap';
import { getAction } from '$lib/action';
import { actions } from '$lib/stores/actions';

View File

@ -11,7 +11,7 @@
InputGroupText,
Label,
Spinner,
} from 'sveltestrap';
} from '@sveltestrap/sveltestrap';
import { actions } from '$lib/stores/actions';
import { getSettings } from '$lib/settings';

View File

@ -1,31 +1,3 @@
{
"extends": "./.svelte-kit/tsconfig.json",
"compilerOptions": {
"moduleResolution": "bundler",
"module": "es2020",
"lib": ["es2020", "DOM"],
"target": "es2020",
/**
svelte-preprocess cannot figure out whether you have a value or a type, so tell TypeScript
to enforce using \`import type\` instead of \`import\` for Types.
*/
"isolatedModules": true,
"resolveJsonModule": true,
/**
To have warnings/errors of the Svelte compiler at the correct position,
enable source maps by default.
*/
"sourceMap": true,
"esModuleInterop": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true,
"baseUrl": ".",
"allowJs": true,
"checkJs": true,
"paths": {
"$lib": ["src/lib"],
"$lib/*": ["src/lib/*"]
}
},
"include": ["src/**/*.d.ts", "src/**/*.js", "src/**/*.ts", "src/**/*.svelte"]
"extends": "./.svelte-kit/tsconfig.json"
}