Skip to content

armgit / dashy

Public Imported from GitHub
0

πŸš€ A self-hostable personal dashboard built for you. Includes status-checking, widgets, themes, icon packs, a UI editor and tons more!

βž– Removes highlight.js, to reduce app size

Alicia Sykes25289f3861f7
diff --git a/package.json b/package.json
index e40fc224..36afc471 100644
--- a/package.json
+++ b/package.json
@@ -22,7 +22,6 @@
"body-parser": "^1.19.0",
"connect": "^3.7.0",
"crypto-js": "^4.0.0",
- "highlight.js": "^11.0.0",
"js-yaml": "^4.1.0",
"npm-run-all": "^4.1.5",
"prismjs": "^1.24.1",
@@ -91,4 +90,4 @@
"> 1%",
"last 2 versions"
]
-}
\ No newline at end of file
+}
diff --git a/src/components/Configuration/ConfigContainer.vue b/src/components/Configuration/ConfigContainer.vue
index 29b70467..37cc397c 100644
--- a/src/components/Configuration/ConfigContainer.vue
+++ b/src/components/Configuration/ConfigContainer.vue
@@ -79,9 +79,6 @@
</template>
<script>
-import hljs from 'highlight.js/lib/core';
-import yaml from 'highlight.js/lib/languages/yaml';
-import 'highlight.js/styles/mono-blue.css';
import JsonToYaml from '@/utils/JsonToYaml';
import { localStorageKeys, modalNames } from '@/utils/defaults';
@@ -179,20 +176,11 @@ export default {
element.click();
document.body.removeChild(element);
},
- /* Highlights the YAML config in View config tab */
- initiateStntaxHighlighter() {
- hljs.registerLanguage('yaml', yaml);
- const highlighted = hljs.highlight(this.jsonParser(this.config), { language: 'yaml' }).value;
- document.getElementById('conf-yaml').innerHTML = highlighted;
- },
getLanguage() {
const lang = getUsersLanguage();
return lang ? `${lang.flag} ${lang.name}` : '';
},
},
- mounted() {
- this.initiateStntaxHighlighter();
- },
};
</script>
diff --git a/yarn.lock b/yarn.lock
index e7fba661..2543963f 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -5045,11 +5045,6 @@ highlight.js@^10.7.1:
resolved "https://registry.yarnpkg.com/highlight.js/-/highlight.js-10.7.3.tgz#697272e3991356e40c3cac566a74eef681756531"
integrity sha512-tzcUFauisWKNHaRkN4Wjl/ZA07gENAjFl3J/c480dprkGTg5EQstgaNFqBfUqCq54kZRIEcreTsAgF/m2quD7A==
-highlight.js@^11.0.0:
- version "11.1.0"
- resolved "https://registry.yarnpkg.com/highlight.js/-/highlight.js-11.1.0.tgz#0198f7326e64ddfbea5f76b00e84ab542cf24ae8"
- integrity sha512-X9VVhYKHQPPuwffO8jk4bP/FVj+ibNCy3HxZZNDXFtJrq4O5FdcdCDRIkDis5MiMnjh7UwEdHgRZJcHFYdzDdA==
-
hmac-drbg@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1"