@golar/vue 0.0.2 → 0.0.6
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/bin.js +6 -1
- package/dist/language-plugin.js +3 -3
- package/package.json +4 -3
package/dist/bin.js
CHANGED
|
@@ -1,14 +1,19 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createVolarPlugin } from "@golar/volar";
|
|
3
|
+
import { Debug, ms } from "@golar/util";
|
|
3
4
|
|
|
4
5
|
//#region src/bin.ts
|
|
6
|
+
const debug = Debug.create("plugin:vue");
|
|
5
7
|
createVolarPlugin({
|
|
6
8
|
filename: import.meta.filename,
|
|
7
9
|
extraFileExtensions: [".vue"],
|
|
8
10
|
languagePlugins: async (cwd, configFileName) => {
|
|
11
|
+
const started = performance.now();
|
|
9
12
|
await import("./patch-language-tools.js");
|
|
13
|
+
const patched = performance.now();
|
|
10
14
|
const { vueLanguagePlugin } = await import("./language-plugin.js");
|
|
11
|
-
|
|
15
|
+
debug.printf("loaded language plugin +%s (patching took +%s)", ms(performance.now() - started), ms(patched - started));
|
|
16
|
+
return [vueLanguagePlugin(cwd, configFileName)];
|
|
12
17
|
}
|
|
13
18
|
});
|
|
14
19
|
|
package/dist/language-plugin.js
CHANGED
|
@@ -8,14 +8,14 @@ import PluginVueScriptJs from "@vue/language-core/lib/plugins/vue-script-js.js";
|
|
|
8
8
|
import PluginVueTemplateHtml from "@vue/language-core/lib/plugins/vue-template-html.js";
|
|
9
9
|
|
|
10
10
|
//#region src/language-plugin.ts
|
|
11
|
-
|
|
11
|
+
function vueLanguagePlugin(cwd, configFileName) {
|
|
12
12
|
const { options: compilerOptions, vueOptions: vueCompilerOptions } = configFileName == null ? createParsedCommandLineByJson(typescript_lite_exports, sys, cwd, {}) : createParsedCommandLine(typescript_lite_exports, sys, configFileName);
|
|
13
|
-
const plugins =
|
|
13
|
+
const plugins = [
|
|
14
14
|
PluginVueTsx,
|
|
15
15
|
PluginFileVue,
|
|
16
16
|
PluginVueScriptJs,
|
|
17
17
|
PluginVueTemplateHtml
|
|
18
|
-
]
|
|
18
|
+
].flatMap(({ default: ctor }) => ctor({
|
|
19
19
|
modules: {
|
|
20
20
|
typescript: typescript_lite_exports,
|
|
21
21
|
"@vue/compiler-dom": compilerDom
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@golar/vue",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.6",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"
|
|
5
|
+
"golarBin": "./dist/bin.js",
|
|
6
6
|
"files": [
|
|
7
7
|
"./dist"
|
|
8
8
|
],
|
|
@@ -24,7 +24,8 @@
|
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"@vue/compiler-dom": "^3.5.0",
|
|
26
26
|
"@vue/language-core": "3.2.2",
|
|
27
|
-
"@golar/volar": "0.0.
|
|
27
|
+
"@golar/volar": "0.0.6",
|
|
28
|
+
"@golar/util": "0.0.6"
|
|
28
29
|
},
|
|
29
30
|
"devDependencies": {
|
|
30
31
|
"@vue/compiler-sfc": "^3.5.27",
|