Bundle & code cleanup (#179)

* Use different YAML solution (391 KB -> 197 KB)

* Update all deps

* Code cleanup
This commit is contained in:
Matt (IPv4) Cowley 2020-10-14 17:12:16 +01:00 committed by GitHub
parent 3aba7956ef
commit 2b8fde7917
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 557 additions and 525 deletions

1047
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -45,10 +45,10 @@
"do-vue": "git+https://github.com/do-community/do-vue.git", "do-vue": "git+https://github.com/do-community/do-vue.git",
"escape-html": "^1.0.3", "escape-html": "^1.0.3",
"files-diff": "0.0.3", "files-diff": "0.0.3",
"js-yaml": "^3.14.0", "json-to-pretty-yaml": "^1.2.2",
"memory-tar-create": "0.0.2", "memory-tar-create": "0.0.2",
"pretty-checkbox-vue": "^1.1.9", "pretty-checkbox-vue": "^1.1.9",
"prismjs": "^1.21.0", "prismjs": "^1.22.0",
"qs": "^6.9.4", "qs": "^6.9.4",
"simple-js-sha2-256": "^1.0.7", "simple-js-sha2-256": "^1.0.7",
"string-similarity": "^4.0.2", "string-similarity": "^4.0.2",
@ -56,17 +56,17 @@
"vue-select": "^3.10.8" "vue-select": "^3.10.8"
}, },
"devDependencies": { "devDependencies": {
"@vue/cli-service": "^4.5.4", "@vue/cli-service": "^4.5.7",
"babel-eslint": "^10.1.0", "babel-eslint": "^10.1.0",
"copyfiles": "^2.3.0", "copyfiles": "^2.4.0",
"duplicate-package-checker-webpack-plugin": "^3.0.0", "duplicate-package-checker-webpack-plugin": "^3.0.0",
"eslint": "^7.8.1", "eslint": "^7.11.0",
"eslint-plugin-vue": "^6.2.2", "eslint-plugin-vue": "^7.0.1",
"sass": "^1.26.10", "sass": "^1.27.0",
"sass-lint": "^1.13.1", "sass-lint": "^1.13.1",
"sass-lint-auto-fix": "^0.21.2", "sass-lint-auto-fix": "^0.21.2",
"sass-loader": "^10.0.2", "sass-loader": "^10.0.3",
"vue-template-compiler": "^2.6.12", "vue-template-compiler": "^2.6.12",
"webpack-bundle-analyzer": "^3.8.0" "webpack-bundle-analyzer": "^3.9.0"
} }
} }

View file

@ -24,8 +24,8 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE. THE SOFTWARE.
*/ */
const yaml = require('js-yaml'); const yaml = require('json-to-pretty-yaml');
export default yamlConf => { export default yamlConf => {
return yaml.safeDump(yamlConf); return yaml.stringify(yamlConf);
}; };

View file

@ -27,12 +27,12 @@ THE SOFTWARE.
<template> <template>
<div class="all do-bulma"> <div class="all do-bulma">
<Header :title="i18n.templates.app.title"> <Header :title="i18n.templates.app.title">
<template v-slot:description> <template #description>
{{ i18n.templates.app.description }} {{ i18n.templates.app.description }}
</template> </template>
<template v-slot:header> <template #header>
</template> </template>
<template v-slot:buttons> <template #buttons>
<a v-if="splitColumn" class="button is-primary is-outline is-hidden-touch" @click="splitColumnToggle"> <a v-if="splitColumn" class="button is-primary is-outline is-hidden-touch" @click="splitColumnToggle">
{{ i18n.templates.app.singleColumnMode }} {{ i18n.templates.app.singleColumnMode }}
</a> </a>
@ -270,8 +270,7 @@ THE SOFTWARE.
splitColumnEvent(nonInteraction = false) { splitColumnEvent(nonInteraction = false) {
analytics('toggle_split_column', 'Button', undefined, Number(this.$data.splitColumn), nonInteraction); analytics('toggle_split_column', 'Button', undefined, Number(this.$data.splitColumn), nonInteraction);
}, },
getPrismComponent(confName) getPrismComponent(confName) {
{
switch (confName) { switch (confName) {
case '/etc/nginx/Dockerfile': case '/etc/nginx/Dockerfile':
return 'DockerPrism'; return 'DockerPrism';

View file

@ -99,11 +99,11 @@ THE SOFTWARE.
export default { export default {
name: 'SetupCertbot', name: 'SetupCertbot',
display: i18n.templates.setupSections.certbot.certbot,
key: 'certbot',
components: { components: {
BashPrism, BashPrism,
}, },
display: i18n.templates.setupSections.certbot.certbot,
key: 'certbot',
props: { props: {
data: Object, data: Object,
}, },