diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e1046cb6..f8cea4aa 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -47,8 +47,8 @@ jobs: - name: Lint run: npm run lint - - name: Compile - run: npm run compile + - name: Type check + run: npm run test-compile - name: Package run: npx vsce@1.93.0 package -o vscode-deno.vsix diff --git a/.gitignore b/.gitignore index f6e22c6b..01218cf4 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,5 @@ out +dist node_modules -client/server -.vscode-test +*.vsix !.vscode -*.vsix \ No newline at end of file diff --git a/.vscodeignore b/.vscodeignore index 964cb7b3..d9fd5542 100644 --- a/.vscodeignore +++ b/.vscodeignore @@ -1,8 +1,8 @@ -.vscode/** -**/*.ts -**/*.map -.gitignore -**/tsconfig.json -**/tsconfig.base.json - -/typescript-deno-plugin +.vscode +node_modules +out +src +*.map +docs +tsconfig.json +/screenshots/*.png diff --git a/package-lock.json b/package-lock.json index f26b324e..006064a0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,6 +14,7 @@ }, "devDependencies": { "@types/node": "^14.14.25", + "esbuild": "^0.12.22", "typescript": "^4.3.5" }, "engines": { @@ -26,6 +27,16 @@ "integrity": "sha512-EPpXLOVqDvisVxtlbvzfyqSsFeQxltFbluZNRndIb8tr9KiBnYNLzrc1N3pyKUCww2RNrfHDViqDWWE1LCJQtQ==", "dev": true }, + "node_modules/esbuild": { + "version": "0.12.22", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.12.22.tgz", + "integrity": "sha512-yWCr9RoFehpqoe/+MwZXJpYOEIt7KOEvNnjIeMZpMSyQt+KCBASM3y7yViiN5dJRphf1wGdUz1+M4rTtWd/ulA==", + "dev": true, + "hasInstallScript": true, + "bin": { + "esbuild": "bin/esbuild" + } + }, "node_modules/typescript": { "version": "4.3.5", "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.3.5.tgz", @@ -61,6 +72,12 @@ "integrity": "sha512-EPpXLOVqDvisVxtlbvzfyqSsFeQxltFbluZNRndIb8tr9KiBnYNLzrc1N3pyKUCww2RNrfHDViqDWWE1LCJQtQ==", "dev": true }, + "esbuild": { + "version": "0.12.22", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.12.22.tgz", + "integrity": "sha512-yWCr9RoFehpqoe/+MwZXJpYOEIt7KOEvNnjIeMZpMSyQt+KCBASM3y7yViiN5dJRphf1wGdUz1+M4rTtWd/ulA==", + "dev": true + }, "typescript": { "version": "4.3.5", "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.3.5.tgz", diff --git a/package.json b/package.json index 0636da74..f8b64723 100644 --- a/package.json +++ b/package.json @@ -49,7 +49,7 @@ "onCommand:deno.reloadImportRegistries", "onWebviewPanel:welcomeDeno" ], - "main": "./client/out/extension", + "main": "./client/dist/main", "contributes": { "breakpoints": [ { @@ -446,8 +446,11 @@ ] }, "scripts": { - "vscode:prepublish": "npm run compile", - "compile": "tsc -b", + "vscode:prepublish": "npm run esbuild-plugin && npm run esbuild-base", + "esbuild-base": "esbuild ./client/src/extension.ts --bundle --outfile=client/dist/main.js --external:vscode --format=cjs --platform=node", + "esbuild-plugin": "esbuild ./typescript-deno-plugin/src/index.ts --bundle --outfile=typescript-deno-plugin/dist/index.js --external:vscode --format=cjs --platform=node", + "esbuild": "npm run esbuild-plugin -- --sourcemap && npm run esbuild-base -- --sourcemap", + "test-compile": "tsc -b", "fmt": "deno fmt .vscode .github client/src media typescript-deno-plugin/src typescript-deno-plugin/*.md docs package.json tsconfig.json README.md CHANGELOG.md", "lint": "deno lint --unstable client/src typescript-deno-plugin/src docs", "watch": "tsc -b -w", @@ -458,6 +461,7 @@ }, "devDependencies": { "@types/node": "^14.14.25", + "esbuild": "^0.12.22", "typescript": "^4.3.5" } -} +} \ No newline at end of file diff --git a/typescript-deno-plugin/package.json b/typescript-deno-plugin/package.json index 37fd69bb..34b53780 100644 --- a/typescript-deno-plugin/package.json +++ b/typescript-deno-plugin/package.json @@ -6,7 +6,7 @@ "private": true, "version": "3.8.1", "publisher": "deno-land", - "main": "./out/index", + "main": "./dist/index", "repository": { "type": "git", "url": "https://github.com/denoland/vscode_deno"