Skip to content

Commit

Permalink
Replace craco with vite
Browse files Browse the repository at this point in the history
  • Loading branch information
GermanBluefox committed Sep 20, 2024
1 parent 65a2a84 commit 38d726f
Show file tree
Hide file tree
Showing 33 changed files with 1,612 additions and 293 deletions.
Binary file added admin/assets/favicon-CSF3NglM.ico
Binary file not shown.
1 change: 1 addition & 0 deletions admin/assets/index-BqFSCGOi.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1,543 changes: 1,543 additions & 0 deletions admin/assets/index-DuD5nTvG.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions admin/assets/index-DuD5nTvG.js.map

Large diffs are not rendered by default.

15 changes: 15 additions & 0 deletions admin/assets/manifest-DQd0VAqi.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"short_name": "ioBroker.cameras",
"name": "ioBroker.cameras",
"icons": [
{
"src": "favicon.ico",
"sizes": "64x64 32x32 24x24 16x16",
"type": "image/x-icon"
}
],
"start_url": ".",
"display": "standalone",
"theme_color": "#000000",
"background_color": "#ffffff"
}
Binary file added admin/cameras.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
46 changes: 46 additions & 0 deletions admin/index_m.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<link
rel="shortcut icon"
href="./assets/favicon-CSF3NglM.ico"
/>
<meta
name="viewport"
content="width=device-width, initial-scale=1, shrink-to-fit=no"
/>
<meta
name="theme-color"
content="#000000"
/>
<link
rel="manifest"
href="./assets/manifest-DQd0VAqi.json"
/>
<script>
const script = document.createElement('script');
window.registerSocketOnLoad = function (cb) {
window.socketLoadedHandler = cb;
};
script.onload = function () {
typeof window.socketLoadedHandler === 'function' && window.socketLoadedHandler();
};
setTimeout(() => {
script.src =
window.location.port === '3000'
? window.location.protocol + '//' + window.location.hostname + ':8081/lib/js/socket.io.js'
: '%PUBLIC_URL%/../../lib/js/socket.io.js';
}, 1000);

document.head.appendChild(script);
</script>
<title>ioBroker.cameras</title>
<script type="module" crossorigin src="./assets/index-DuD5nTvG.js"></script>
<link rel="stylesheet" crossorigin href="./assets/index-BqFSCGOi.css">
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
</body>
</html>
5 changes: 3 additions & 2 deletions src-widgets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,17 @@
"private": true,
"version": "2.1.2",
"dependencies": {
"@babel/plugin-proposal-private-property-in-object": "^7.21.11",
"@craco/craco": "^7.1.0",
"@iobroker/adapter-react-v5": "^7.1.4",
"@iobroker/vis-2-widgets-react-dev": "^4.0.3",
"@mui/icons-material": "^6.1.1",
"@mui/material": "^6.1.1",
"craco-esbuild": "^0.6.1",
"craco-module-federation": "^1.1.0",
"eslint-config-react-app": "^7.0.1",
"eslint": "^8.57.0",
"eslint-config-airbnb": "^19.0.4",
"eslint-config-react-app": "^7.0.1",
"eslint-plugin-eqeqeq-fix": "^1.0.3",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-jsx-a11y": "^6.9.0",
Expand Down Expand Up @@ -47,4 +48,4 @@
"not ie <= 11",
"not op_mini all"
]
}
}
2 changes: 1 addition & 1 deletion src/src/i18n/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"Options": "Optionen",
"Save": "speichern",
"Save and close": "Speichern und schließen",
"Save configuration to file": "Konfiguration in Datei speichernn",
"Save configuration to file": "Konfiguration in Datei speichern",
"Success": "Erfolgreich",
"Test connection": "Testverbindung",
"Type": "Typ",
Expand Down
3 changes: 2 additions & 1 deletion src/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ import type { UserConfig } from 'vite';
export default {
build: {
outDir: 'build',
sourcemap: true,
rollupOptions: {
onwarn: (warning: any, warn: (log: any) => void) => {
if (warning.code === 'MODULE_LEVEL_DIRECTIVE') {
if (warning.code === 'MODULE_LEVEL_DIRECTIVE' || warning.code === 'SOURCEMAP_ERROR') {
return;
}
warn(warning);
Expand Down
2 changes: 0 additions & 2 deletions widgets/cameras/customWidgets.js

This file was deleted.

1 change: 0 additions & 1 deletion widgets/cameras/customWidgets.js.map

This file was deleted.

23 changes: 0 additions & 23 deletions widgets/cameras/i18n/de.json

This file was deleted.

23 changes: 0 additions & 23 deletions widgets/cameras/i18n/en.json

This file was deleted.

Loading

0 comments on commit 38d726f

Please sign in to comment.