diff options
author | 2022-02-18 20:47:10 -0800 | |
---|---|---|
committer | 2022-02-18 20:47:10 -0800 | |
commit | e11f44e0392ba8f112b73e6c03c1465fb55f6add (patch) | |
tree | dff823faa7fda477cca80468ea138374bc8bfe4f | |
parent | c27577147c2fb38833772c7a99e8b9585fc22968 (diff) | |
download | bun-e11f44e0392ba8f112b73e6c03c1465fb55f6add.tar.gz bun-e11f44e0392ba8f112b73e6c03c1465fb55f6add.tar.zst bun-e11f44e0392ba8f112b73e6c03c1465fb55f6add.zip |
Add a way to specify an editor in bunfig.toml
Diffstat (limited to '')
-rw-r--r-- | src/bunfig.zig | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/bunfig.zig b/src/bunfig.zig index f11e0377f..2088525b5 100644 --- a/src/bunfig.zig +++ b/src/bunfig.zig @@ -403,12 +403,24 @@ pub const Bunfig = struct { .AutoCommand, .DevCommand, .BuildCommand, .BunCommand => { if (json.get("publicDir")) |public_dir| { try this.expect(public_dir, .e_string); - this.bunfig.router = Api.RouteConfig{ .extensions = &.{}, .dir = &.{}, .static_dir = try public_dir.data.e_string.string(allocator) }; + this.bunfig.router = Api.RouteConfig{ + .extensions = &.{}, + .dir = &.{}, + .static_dir = try public_dir.data.e_string.string(allocator), + }; } }, else => {}, } + if (json.get("debug")) |expr| { + if (expr.get("editor")) |editor| { + if (editor.asString(allocator)) |value| { + this.ctx.debug.editor = value; + } + } + } + if (json.get("macros")) |expr| { // technical debt this.ctx.debug.macros = PackageJSON.parseMacrosJSON(allocator, expr, this.log, this.source); |