bazel + gazelle integration
parent
b269ca3100
commit
40713dd763
@ -0,0 +1,33 @@
|
|||||||
|
load("@rules_go//go:def.bzl", "go_library", "go_test")
|
||||||
|
load("@gazelle//:def.bzl", "gazelle")
|
||||||
|
|
||||||
|
gazelle(name = "gazelle")
|
||||||
|
|
||||||
|
go_library(
|
||||||
|
name = "obsidian-markdown",
|
||||||
|
srcs = [
|
||||||
|
"lexemetype_string.go",
|
||||||
|
"lexer.go",
|
||||||
|
"states.go",
|
||||||
|
"wikilink.go",
|
||||||
|
],
|
||||||
|
importpath = "code.ndumas.com/ndumas/obsidian-markdown",
|
||||||
|
visibility = ["//visibility:public"],
|
||||||
|
deps = [
|
||||||
|
"@org_uber_go_zap//:zap",
|
||||||
|
"@org_uber_go_zap//zapcore",
|
||||||
|
],
|
||||||
|
)
|
||||||
|
|
||||||
|
go_test(
|
||||||
|
name = "obsidian-markdown_test",
|
||||||
|
srcs = [
|
||||||
|
"lexer_test.go",
|
||||||
|
"wikilink_test.go",
|
||||||
|
],
|
||||||
|
deps = [
|
||||||
|
":obsidian-markdown",
|
||||||
|
"@com_github_stretchr_testify//assert",
|
||||||
|
"@org_uber_go_zap//zapcore",
|
||||||
|
],
|
||||||
|
)
|
@ -0,0 +1,12 @@
|
|||||||
|
module(
|
||||||
|
name = "obsidian-markdown",
|
||||||
|
repo_name = "code.ndumas.com_ndumas_obsidian-markdown",
|
||||||
|
)
|
||||||
|
|
||||||
|
bazel_dep(name = "gazelle", version = "0.32.0")
|
||||||
|
bazel_dep(name = "rules_go", version = "0.41.0")
|
||||||
|
bazel_dep(name = "rules_oci", version = "1.2.0")
|
||||||
|
|
||||||
|
go_deps = use_extension("@gazelle//:extensions.bzl", "go_deps")
|
||||||
|
go_deps.from_file(go_mod = "//:go.mod")
|
||||||
|
use_repo(go_deps, "com_github_stretchr_testify", "org_uber_go_zap")
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,18 @@
|
|||||||
|
load("@rules_go//go:def.bzl", "go_binary", "go_library")
|
||||||
|
|
||||||
|
go_library(
|
||||||
|
name = "demo_lib",
|
||||||
|
srcs = ["main.go"],
|
||||||
|
importpath = "code.ndumas.com/ndumas/obsidian-markdown/cmd/demo",
|
||||||
|
visibility = ["//visibility:private"],
|
||||||
|
deps = [
|
||||||
|
"//:obsidian-markdown",
|
||||||
|
"@org_uber_go_zap//zapcore",
|
||||||
|
],
|
||||||
|
)
|
||||||
|
|
||||||
|
go_binary(
|
||||||
|
name = "demo",
|
||||||
|
embed = [":demo_lib"],
|
||||||
|
visibility = ["//visibility:public"],
|
||||||
|
)
|
Loading…
Reference in New Issue