Skip to content

Commit

Permalink
Merge pull request #20 from narumincho/dev
Browse files Browse the repository at this point in the history
update 1.90.0
  • Loading branch information
narumincho authored Jun 7, 2024
2 parents 2de3bb4 + a469226 commit 671ad32
Show file tree
Hide file tree
Showing 10 changed files with 1,757 additions and 45 deletions.
2 changes: 1 addition & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"args": [
"--extensionDevelopmentPath=${workspaceFolder}/vscodeExtensionDistribution/",
"--extensionDevelopmentKind=web"
]
],
}
]
}
4 changes: 3 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,7 @@
"editor.formatOnSave": true,
"[typescript]": {
"editor.defaultFormatter": "denoland.vscode-deno"
}
},
"[json]": { "editor.defaultFormatter": "denoland.vscode-deno" },
"[jsonc]": { "editor.defaultFormatter": "denoland.vscode-deno" }
}
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,13 @@
modified for Deno from
https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/vscode/index.d.ts

esbuild or something similar should be used. ( https://deno.land/x/esbuild )
or emit or something similar should be used. ( https://deno.land/x/esbuild )

Must be bundled with

- [esbuild](https://github.com/esbuild/deno-esbuild) with
[esbuild-deno-loader](https://github.com/lucacasonato/esbuild_deno_loader)
- or similar

```ts
import { type ExtensionContext, importVsCodeApi } from "jsr:@narumincho/vscode";
Expand Down
7 changes: 5 additions & 2 deletions deno.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"name": "@narumincho/vscode",
"version": "1.89.0",
"exports": "./mod.ts"
"version": "1.90.0",
"exports": "./mod.ts",
"tasks": {
"build-example": "deno run -A ./example/build.ts"
}
}
180 changes: 180 additions & 0 deletions deno.lock

Large diffs are not rendered by default.

53 changes: 27 additions & 26 deletions example/build.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { denoPlugins } from "https://deno.land/x/esbuild_deno_loader@0.8.2/mod.ts";
import { denoPlugins } from "https://deno.land/x/esbuild_deno_loader@0.9.0/mod.ts";
import {
build as esBuild,
Plugin,
} from "https://deno.land/x/esbuild@v0.19.7/mod.js";
import { ensureFile } from "https://deno.land/[email protected]/fs/mod.ts";
import { resolve } from "https://deno.land/[email protected]/path/mod.ts";
type Plugin,
} from "https://deno.land/x/esbuild@v0.21.4/mod.js";
import { ensureFile } from "jsr:@std/fs";
import { resolve } from "jsr:@std/path";

/**
* ```bash
Expand All @@ -25,7 +25,7 @@ export const writeTextFileWithLog = async (

const distributionPath = "./vscodeExtensionDistribution/";

const build = async (): Promise<string> => {
const buildMainJs = async (): Promise<string> => {
const esbuildResult = await esBuild({
entryPoints: ["./example/main.ts"],
plugins: denoPlugins() as Plugin[],
Expand Down Expand Up @@ -53,37 +53,38 @@ const scriptRelativePath = "./main.js";
await Promise.all([
writeTextFileWithLog(
resolve(distributionPath, scriptRelativePath),
await build(),
await buildMainJs(),
),

writeTextFileWithLog(
resolve(distributionPath, "./package.json"),
JSON.stringify({
"name": "example",
"version": "0.0.1",
"description": "example VSCode extension",
"repository": {
"url": "git+https://github.com/narumincho/vscode.git",
"type": "git",
name: "example",
version: "0.0.1",
description: "example VSCode extension",
repository: {
url: "git+https://github.com/narumincho/vscode.git",
type: "git",
},
"license": "MIT",
"homepage": "https://github.com/narumincho/vscode",
"author": "narumincho",
"engines": {
"vscode": "^1.76.0",
license: "MIT",
homepage: "https://github.com/narumincho/vscode",
author: "narumincho",
engines: {
vscode: "^1.76.0",
},
"dependencies": {},
"activationEvents": [],
"contributes": {
"commands": [
dependencies: {},
activationEvents: [],
contributes: {
commands: [
{
"command": "extension.helloWorld",
"title": "Hello World",
command: "extension.helloWorld",
title: "Hello World",
},
],
},
"browser": scriptRelativePath,
"publisher": "narumincho",
type: "module",
browser: scriptRelativePath,
publisher: "narumincho",
}),
),

Expand Down
20 changes: 10 additions & 10 deletions gen/Cargo.lock

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

6 changes: 3 additions & 3 deletions gen/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
tokio = { version = "1.37.0", features = ["macros", "rt-multi-thread"] }
anyhow = "1.0.82"
tokio = { version = "1.38.0", features = ["macros", "rt-multi-thread"] }
anyhow = "1.0.86"
reqwest = "0.11.27"
thiserror = "1.0.59"
thiserror = "1.0.61"
swc_atoms = "0.5.9"
swc_common = "0.31.22"
swc_ecma_parser = "0.137.16"
Expand Down
Loading

0 comments on commit 671ad32

Please sign in to comment.