@vuetify/vue-repl 1.6.3 → 1.6.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/vue-repl.js +14 -11
- package/dist/vue-repl.js.map +1 -1
- package/package.json +1 -1
package/dist/vue-repl.js
CHANGED
|
@@ -33117,17 +33117,20 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
33117
33117
|
emit("change", editor.getValue());
|
|
33118
33118
|
});
|
|
33119
33119
|
editor.on("blur", () => {
|
|
33120
|
-
const parser = props.
|
|
33121
|
-
|
|
33122
|
-
|
|
33123
|
-
|
|
33124
|
-
|
|
33125
|
-
|
|
33126
|
-
|
|
33127
|
-
|
|
33128
|
-
|
|
33129
|
-
|
|
33130
|
-
|
|
33120
|
+
const parser = props.extension === "vue" ? "html" : props.extension === "html" ? "html" : props.extension === "css" ? "css" : props.extension === "js" ? "babel" : props.extension === "ts" ? "babel" : props.extension || props.mode;
|
|
33121
|
+
const options = {
|
|
33122
|
+
parser,
|
|
33123
|
+
plugins: [parserBabel, parserHtml, parserPostcss],
|
|
33124
|
+
semi: false,
|
|
33125
|
+
singleQuote: true,
|
|
33126
|
+
arrowParens: "avoid"
|
|
33127
|
+
};
|
|
33128
|
+
let code = editor.getValue();
|
|
33129
|
+
try {
|
|
33130
|
+
code = prettier.format(code, options);
|
|
33131
|
+
} catch (err) {
|
|
33132
|
+
}
|
|
33133
|
+
emit("change", code);
|
|
33131
33134
|
});
|
|
33132
33135
|
watchEffect(() => {
|
|
33133
33136
|
const cur = editor.getValue();
|