Skip to content

Commit 8aacd39

Browse files
committed
chore: delete the ts plugin extension
1 parent 57cba40 commit 8aacd39

File tree

14 files changed

+45
-160
lines changed

14 files changed

+45
-160
lines changed

Diff for: .vscode/launch.json

-17
Original file line numberDiff line numberDiff line change
@@ -19,23 +19,6 @@
1919
"script": "watch"
2020
}
2121
},
22-
{
23-
"type": "extensionHost",
24-
"request": "launch",
25-
"name": "Launch TypeScript Plugin",
26-
"runtimeExecutable": "${execPath}",
27-
"args": [
28-
"--disable-extensions",
29-
"--extensionDevelopmentPath=${workspaceRoot}/extensions/vscode-typescript-plugin"
30-
],
31-
"outFiles": [
32-
"${workspaceRoot}/*/*/out/**/*.js"
33-
],
34-
"preLaunchTask": {
35-
"type": "npm",
36-
"script": "watch"
37-
}
38-
},
3922
{
4023
"name": "Launch Web Client",
4124
"type": "pwa-extensionHost",

Diff for: extensions/vscode-typescript-plugin/.vscodeignore

-2
This file was deleted.

Diff for: extensions/vscode-typescript-plugin/CHANGELOG.md

-1
This file was deleted.

Diff for: extensions/vscode-typescript-plugin/LICENSE

-21
This file was deleted.

Diff for: extensions/vscode-typescript-plugin/README.md

-22
This file was deleted.

Diff for: extensions/vscode-typescript-plugin/images/icon.png

-19.6 KB
Binary file not shown.

Diff for: extensions/vscode-typescript-plugin/package.json

-43
This file was deleted.

Diff for: extensions/vscode-typescript-plugin/scripts/build.js

-35
This file was deleted.

Diff for: extensions/vscode-typescript-plugin/tsconfig.json

-11
This file was deleted.

Diff for: extensions/vscode/package.json

+10
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,15 @@
201201
"id": "vue-sfc-style-variable-injection"
202202
}
203203
],
204+
"typescriptServerPlugins": [
205+
{
206+
"name": "typescript-vue-plugin-bundle",
207+
"enableForWorkspaceTypeScriptVersions": true,
208+
"languages": [
209+
"vue"
210+
]
211+
}
212+
],
204213
"grammars": [
205214
{
206215
"language": "vue",
@@ -744,6 +753,7 @@
744753
"esbuild-plugin-copy": "latest",
745754
"esbuild-visualizer": "latest",
746755
"semver": "^7.5.4",
756+
"typescript-vue-plugin": "1.8.25",
747757
"vsce": "latest",
748758
"vscode-languageclient": "^9.0.1"
749759
}

Diff for: extensions/vscode/scripts/build.js

+31-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
// @ts-check
2-
32
const path = require('path');
43
const fs = require('fs');
54

@@ -63,3 +62,34 @@ require('esbuild').context({
6362
console.log('finished.');
6463
}
6564
})
65+
66+
require('esbuild').context({
67+
entryPoints: ['./node_modules/typescript-vue-plugin/out/index.js'],
68+
bundle: true,
69+
outfile: './node_modules/typescript-vue-plugin-bundle/index.js',
70+
external: ['vscode'],
71+
format: 'cjs',
72+
platform: 'node',
73+
tsconfig: './tsconfig.json',
74+
minify: process.argv.includes('--minify'),
75+
plugins: [{
76+
name: 'umd2esm',
77+
setup(build) {
78+
build.onResolve({ filter: /^(vscode-.*-languageservice|jsonc-parser)/ }, args => {
79+
const pathUmdMay = require.resolve(args.path, { paths: [args.resolveDir] })
80+
const pathEsm = pathUmdMay.replace('/umd/', '/esm/')
81+
return { path: pathEsm }
82+
})
83+
},
84+
}],
85+
}).then(async ctx => {
86+
console.log('building...');
87+
if (process.argv.includes('--watch')) {
88+
await ctx.watch();
89+
console.log('watching...');
90+
} else {
91+
await ctx.rebuild();
92+
await ctx.dispose();
93+
console.log('finished.');
94+
}
95+
})

Diff for: extensions/vscode/tsconfig.json

+1
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,6 @@
77
"include": [ "src" ],
88
"references": [
99
{ "path": "../../packages/language-server/tsconfig.json" },
10+
{ "path": "../../packages/typescript-plugin/tsconfig.json" },
1011
],
1112
}

Diff for: package.json

+3-6
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,17 @@
22
"private": true,
33
"scripts": {
44
"build": "tsc -b",
5-
"watch": "npm run build && (npm run watch:base & npm run watch:vue & npm run watch:ts-plugin)",
5+
"watch": "npm run build && (npm run watch:base & npm run watch:vue)",
66
"watch:base": "tsc -b -w",
77
"watch:vue": "cd ./extensions/vscode && npm run watch",
8-
"watch:ts-plugin": "cd ./extensions/vscode-typescript-plugin && npm run watch",
98
"prerelease": "npm run build && npm run test",
109
"version:test": "lerna version --exact --force-publish --yes --sync-workspace-lock --no-push --no-git-tag-version",
11-
"release": "npm run release:base && npm run release:vue && npm run release:ts-plugin",
10+
"release": "npm run release:base && npm run release:vue",
1211
"release:base": "lerna publish --exact --force-publish --yes --sync-workspace-lock --no-push",
1312
"release:vue": "cd ./extensions/vscode && npm run release",
14-
"release:ts-plugin": "cd ./extensions/vscode-typescript-plugin && npm run release",
15-
"release:next": "npm run release:next-base && npm run release:next-vue && npm run release:next-ts-plugin",
13+
"release:next": "npm run release:next-base && npm run release:next-vue",
1614
"release:next-base": "npm run release:base -- --dist-tag next",
1715
"release:next-vue": "cd ./extensions/vscode && npm run release:next",
18-
"release:next-ts-plugin": "cd ./extensions/vscode-typescript-plugin && npm run release:next",
1916
"test": "vitest run",
2017
"chrome": "vscode-test-web --browserType=chromium --extensionDevelopmentPath=./extensions/vscode ../volar-starter"
2118
},

Diff for: tsconfig.json

-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
"include": [ "packages/*/tests" ],
77
"references": [
88
{ "path": "./extensions/vscode/tsconfig.json" },
9-
{ "path": "./extensions/vscode-typescript-plugin/tsconfig.json" },
109
{ "path": "./packages/language-plugin-pug/tsconfig.json" },
1110
{ "path": "./packages/typescript-plugin/tsconfig.json" },
1211
{ "path": "./packages/tsc/tsconfig.json" },

0 commit comments

Comments
 (0)