diff --git a/bun.lockb b/bun.lockb index ff974ad..2f499f1 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/package.json b/package.json index 8a4cfaf..5b3b1b3 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,8 @@ "tailwindcss": "^3.4.14", "vue": "^3.5.12", "vue-axios": "^3.5.2", - "vue-router": "^4.4.5" + "vue-router": "^4.4.5", + "yaml": "^2.6.0" }, "devDependencies": { "@rushstack/eslint-patch": "^1.10.4", diff --git a/src/router/index.js b/src/router/index.js index c47b1c1..e45f800 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -112,17 +112,26 @@ const router = createRouter({ }, /** - * JSON manipulation + * JSON */ { path: "/json_formatter", name: "json_formatter", - component: () => import("../views/json/JSONFormatter.vue"), + component: () => import("../views/json/Formatter.vue"), }, { path: "/json_minifier", name: "json_minifier", - component: () => import("../views/json/JSONMinifier.vue"), + component: () => import("../views/json/Minifier.vue"), + }, + + /** + * YAML + */ + { + path: "/yaml_formatter", + name: "yaml_formatter", + component: () => import("../views/yaml/Formatter.vue"), }, /** diff --git a/src/stores/toolsStore.js b/src/stores/toolsStore.js index 94a5a66..b54da52 100644 --- a/src/stores/toolsStore.js +++ b/src/stores/toolsStore.js @@ -38,6 +38,9 @@ export const useToolsStore = defineStore("tools", { json_minifier: "JSON minifier", json_formatter: "JSON formatter", }, + YAML: { + yaml_formatter: "YAML formatter", + }, PHP: { str_to_php_array: "Str to PHP array", php_array_to_json: "PHP array to Json", diff --git a/src/views/json/JSONFormatter.vue b/src/views/json/Formatter.vue similarity index 100% rename from src/views/json/JSONFormatter.vue rename to src/views/json/Formatter.vue diff --git a/src/views/json/JSONMinifier.vue b/src/views/json/Minifier.vue similarity index 100% rename from src/views/json/JSONMinifier.vue rename to src/views/json/Minifier.vue diff --git a/src/views/yaml/Formatter.vue b/src/views/yaml/Formatter.vue new file mode 100644 index 0000000..b9dc5ee --- /dev/null +++ b/src/views/yaml/Formatter.vue @@ -0,0 +1,157 @@ + + + + +