Skip to content

Commit

Permalink
delete ts plugin extension
Browse files Browse the repository at this point in the history
  • Loading branch information
johnsoncodehk committed Dec 7, 2023
1 parent d78043f commit 8984da6
Show file tree
Hide file tree
Showing 15 changed files with 57 additions and 175 deletions.
17 changes: 0 additions & 17 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,23 +19,6 @@
"script": "watch"
}
},
{
"type": "extensionHost",
"request": "launch",
"name": "Launch TypeScript Plugin",
"runtimeExecutable": "${execPath}",
"args": [
"--disable-extensions",
"--extensionDevelopmentPath=${workspaceRoot}/extensions/vscode-typescript-plugin"
],
"outFiles": [
"${workspaceRoot}/*/*/out/**/*.js"
],
"preLaunchTask": {
"type": "npm",
"script": "watch"
}
},
{
"name": "Launch Web Client",
"type": "pwa-extensionHost",
Expand Down
2 changes: 0 additions & 2 deletions extensions/vscode-typescript-plugin/.vscodeignore

This file was deleted.

1 change: 0 additions & 1 deletion extensions/vscode-typescript-plugin/CHANGELOG.md

This file was deleted.

21 changes: 0 additions & 21 deletions extensions/vscode-typescript-plugin/LICENSE

This file was deleted.

22 changes: 0 additions & 22 deletions extensions/vscode-typescript-plugin/README.md

This file was deleted.

Binary file removed extensions/vscode-typescript-plugin/images/icon.png
Binary file not shown.
43 changes: 0 additions & 43 deletions extensions/vscode-typescript-plugin/package.json

This file was deleted.

35 changes: 0 additions & 35 deletions extensions/vscode-typescript-plugin/scripts/build.js

This file was deleted.

11 changes: 0 additions & 11 deletions extensions/vscode-typescript-plugin/tsconfig.json

This file was deleted.

10 changes: 10 additions & 0 deletions extensions/vscode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,15 @@
"id": "vue-sfc-style-variable-injection"
}
],
"typescriptServerPlugins": [
{
"name": "typescript-vue-plugin-bundle",
"enableForWorkspaceTypeScriptVersions": true,
"languages": [
"vue"
]
}
],
"grammars": [
{
"language": "vue",
Expand Down Expand Up @@ -744,6 +753,7 @@
"esbuild-plugin-copy": "latest",
"esbuild-visualizer": "latest",
"semver": "^7.5.4",
"typescript-vue-plugin": "1.8.25",
"vsce": "latest",
"vscode-languageclient": "^9.0.1"
}
Expand Down
32 changes: 31 additions & 1 deletion extensions/vscode/scripts/build.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// @ts-check

const path = require('path');
const fs = require('fs');

Expand Down Expand Up @@ -63,3 +62,34 @@ require('esbuild').context({
console.log('finished.');
}
})

require('esbuild').context({
entryPoints: ['./node_modules/typescript-vue-plugin/out/index.js'],
bundle: true,
outfile: './node_modules/typescript-vue-plugin-bundle/index.js',
external: ['vscode'],
format: 'cjs',
platform: 'node',
tsconfig: './tsconfig.json',
minify: process.argv.includes('--minify'),
plugins: [{
name: 'umd2esm',
setup(build) {
build.onResolve({ filter: /^(vscode-.*-languageservice|jsonc-parser)/ }, args => {
const pathUmdMay = require.resolve(args.path, { paths: [args.resolveDir] })
const pathEsm = pathUmdMay.replace('/umd/', '/esm/')
return { path: pathEsm }
})
},
}],
}).then(async ctx => {
console.log('building...');
if (process.argv.includes('--watch')) {
await ctx.watch();
console.log('watching...');
} else {
await ctx.rebuild();
await ctx.dispose();
console.log('finished.');
}
})
1 change: 1 addition & 0 deletions extensions/vscode/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@
"include": [ "src" ],
"references": [
{ "path": "../../packages/language-server/tsconfig.json" },
{ "path": "../../packages/typescript-plugin/tsconfig.json" },
],
}
9 changes: 3 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,17 @@
"private": true,
"scripts": {
"build": "tsc -b",
"watch": "npm run build && (npm run watch:base & npm run watch:vue & npm run watch:ts-plugin)",
"watch": "npm run build && (npm run watch:base & npm run watch:vue)",
"watch:base": "tsc -b -w",
"watch:vue": "cd ./extensions/vscode && npm run watch",
"watch:ts-plugin": "cd ./extensions/vscode-typescript-plugin && npm run watch",
"prerelease": "npm run build && npm run test",
"version:test": "lerna version --exact --force-publish --yes --sync-workspace-lock --no-push --no-git-tag-version",
"release": "npm run release:base && npm run release:vue && npm run release:ts-plugin",
"release": "npm run release:base && npm run release:vue",
"release:base": "lerna publish --exact --force-publish --yes --sync-workspace-lock --no-push",
"release:vue": "cd ./extensions/vscode && npm run release",
"release:ts-plugin": "cd ./extensions/vscode-typescript-plugin && npm run release",
"release:next": "npm run release:next-base && npm run release:next-vue && npm run release:next-ts-plugin",
"release:next": "npm run release:next-base && npm run release:next-vue",
"release:next-base": "npm run release:base -- --dist-tag next",
"release:next-vue": "cd ./extensions/vscode && npm run release:next",
"release:next-ts-plugin": "cd ./extensions/vscode-typescript-plugin && npm run release:next",
"test": "vitest run",
"chrome": "vscode-test-web --browserType=chromium --extensionDevelopmentPath=./extensions/vscode ../volar-starter"
},
Expand Down
27 changes: 12 additions & 15 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
"include": [ "packages/*/tests" ],
"references": [
{ "path": "./extensions/vscode/tsconfig.json" },
{ "path": "./extensions/vscode-typescript-plugin/tsconfig.json" },
{ "path": "./packages/language-plugin-pug/tsconfig.json" },
{ "path": "./packages/typescript-plugin/tsconfig.json" },
{ "path": "./packages/tsc/tsconfig.json" },
Expand Down

0 comments on commit 8984da6

Please sign in to comment.