diff options
| author | William Boman <william@redwill.se> | 2023-02-20 22:19:39 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-02-20 22:19:39 +0100 |
| commit | b8a6632a0f2d263199d5d480ca85477fe0f414ab (patch) | |
| tree | 57e1ee0f3cef078ec144ecdf1b2fa861acf47755 /lua/mason-registry/index/chrome-debug-adapter/init.lua | |
| parent | chore: autogenerate (#1015) (diff) | |
| download | mason-b8a6632a0f2d263199d5d480ca85477fe0f414ab.tar mason-b8a6632a0f2d263199d5d480ca85477fe0f414ab.tar.gz mason-b8a6632a0f2d263199d5d480ca85477fe0f414ab.tar.bz2 mason-b8a6632a0f2d263199d5d480ca85477fe0f414ab.tar.lz mason-b8a6632a0f2d263199d5d480ca85477fe0f414ab.tar.xz mason-b8a6632a0f2d263199d5d480ca85477fe0f414ab.tar.zst mason-b8a6632a0f2d263199d5d480ca85477fe0f414ab.zip | |
feat: configurable registries (#1016)
Diffstat (limited to 'lua/mason-registry/index/chrome-debug-adapter/init.lua')
| -rw-r--r-- | lua/mason-registry/index/chrome-debug-adapter/init.lua | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/lua/mason-registry/index/chrome-debug-adapter/init.lua b/lua/mason-registry/index/chrome-debug-adapter/init.lua new file mode 100644 index 00000000..3ebfb736 --- /dev/null +++ b/lua/mason-registry/index/chrome-debug-adapter/init.lua @@ -0,0 +1,32 @@ +local Pkg = require "mason-core.package" +local github = require "mason-core.managers.github" +local git = require "mason-core.managers.git" +local _ = require "mason-core.functional" +local path = require "mason-core.path" +local Optional = require "mason-core.optional" + +return Pkg.new { + name = "chrome-debug-adapter", + desc = [[Debug your JavaScript code running in Google Chrome.]], + homepage = "https://github.com/Microsoft/vscode-chrome-debug", + languages = { Pkg.Lang.JavaScript, Pkg.Lang.TypeScript }, + categories = { Pkg.Cat.DAP }, + ---@async + ---@param ctx InstallContext + install = function(ctx) + local source = github.tag { repo = "Microsoft/vscode-chrome-debug" } + source.with_receipt() + git.clone { "https://github.com/Microsoft/vscode-chrome-debug", version = Optional.of(source.tag) } + ctx.spawn.npm { "install" } + ctx.spawn.npm { "run", "build" } + ctx.spawn.npm { "install", "--production", "--ignore-scripts" } + -- vscode-chrome-debug comes with a lot of extra baggage + ctx.fs:rmrf "images" + ctx.fs:rmrf "testdata" + ctx.fs:rmrf ".git" + ctx:link_bin( + "chrome-debug-adapter", + ctx:write_node_exec_wrapper("chrome-debug-adapter", path.concat { "out", "src", "chromeDebug.js" }) + ) + end, +} |
