mirror of
https://github.com/NoRedInk/noredink-ui.git
synced 2024-11-22 23:30:42 +03:00
format all bzl files consistently with buildifier
This commit is contained in:
parent
4db7f76d3a
commit
6c15c63487
2
BUCK
2
BUCK
@ -11,7 +11,7 @@ elm_docs(
|
||||
filegroup(
|
||||
name = "src",
|
||||
srcs = glob(["src/**/*.elm"]),
|
||||
visibility = ["//component-catalog:app"]
|
||||
visibility = ["//component-catalog:app"],
|
||||
)
|
||||
|
||||
node_modules(
|
||||
|
@ -8,7 +8,7 @@ elm_app(
|
||||
source_directories = {
|
||||
"../src": "//:src",
|
||||
"src": "src",
|
||||
}
|
||||
},
|
||||
)
|
||||
|
||||
filegroup(
|
||||
@ -20,5 +20,5 @@ filegroup(
|
||||
"elm.js": ":app",
|
||||
"application.json": "elm.json",
|
||||
"package.json": "//:elm.json",
|
||||
}
|
||||
},
|
||||
)
|
||||
|
@ -11,12 +11,16 @@ def _elm_docs_impl(ctx: "context") -> [DefaultInfo.type]:
|
||||
ctx.attrs._python_toolchain[PythonToolchainInfo].interpreter,
|
||||
elm_toolchain.isolated_compile[DefaultInfo].default_outputs,
|
||||
ctx.attrs.elm_json,
|
||||
"--build-dir", build.as_output(),
|
||||
"--elm-compiler", elm_toolchain.elm,
|
||||
"--build-dir",
|
||||
build.as_output(),
|
||||
"--elm-compiler",
|
||||
elm_toolchain.elm,
|
||||
"--verbose",
|
||||
"docs",
|
||||
"--out", docs.as_output(),
|
||||
"--src", ctx.attrs.src,
|
||||
"--out",
|
||||
docs.as_output(),
|
||||
"--src",
|
||||
ctx.attrs.src,
|
||||
)
|
||||
|
||||
ctx.actions.run(
|
||||
@ -35,13 +39,13 @@ elm_docs = rule(
|
||||
"src": attrs.source(allow_directory = True),
|
||||
"_elm_toolchain": attrs.toolchain_dep(
|
||||
default = "toolchains//:elm",
|
||||
providers=[ElmToolchainInfo]
|
||||
providers = [ElmToolchainInfo],
|
||||
),
|
||||
"_python_toolchain": attrs.toolchain_dep(
|
||||
default = "toolchains//:python",
|
||||
providers=[PythonToolchainInfo]
|
||||
providers = [PythonToolchainInfo],
|
||||
),
|
||||
}
|
||||
},
|
||||
)
|
||||
|
||||
def _elm_app_impl(ctx: "context") -> [DefaultInfo.type]:
|
||||
@ -54,12 +58,15 @@ def _elm_app_impl(ctx: "context") -> [DefaultInfo.type]:
|
||||
ctx.attrs._python_toolchain[PythonToolchainInfo].interpreter,
|
||||
elm_toolchain.isolated_compile[DefaultInfo].default_outputs,
|
||||
ctx.attrs.elm_json,
|
||||
"--build-dir", build.as_output(),
|
||||
"--elm-compiler", elm_toolchain.elm,
|
||||
"--build-dir",
|
||||
build.as_output(),
|
||||
"--elm-compiler",
|
||||
elm_toolchain.elm,
|
||||
"--verbose",
|
||||
"make",
|
||||
ctx.attrs.main,
|
||||
"--output", out.as_output(),
|
||||
"--output",
|
||||
out.as_output(),
|
||||
)
|
||||
|
||||
for (name, value) in ctx.attrs.source_directories.items():
|
||||
@ -96,11 +103,11 @@ elm_app = rule(
|
||||
"optimize": attrs.bool(default = False),
|
||||
"_elm_toolchain": attrs.toolchain_dep(
|
||||
default = "toolchains//:elm",
|
||||
providers=[ElmToolchainInfo]
|
||||
providers = [ElmToolchainInfo],
|
||||
),
|
||||
"_python_toolchain": attrs.toolchain_dep(
|
||||
default = "toolchains//:python",
|
||||
providers=[PythonToolchainInfo]
|
||||
providers = [PythonToolchainInfo],
|
||||
),
|
||||
}
|
||||
},
|
||||
)
|
||||
|
@ -16,7 +16,6 @@ def _system_elm_toolchain_impl(ctx) -> [[DefaultInfo.type, ElmToolchainInfo.type
|
||||
),
|
||||
]
|
||||
|
||||
|
||||
system_elm_toolchain = rule(
|
||||
impl = _system_elm_toolchain_impl,
|
||||
attrs = {
|
||||
|
@ -11,9 +11,12 @@ def _node_modules_impl(ctx: "context") -> [DefaultInfo.type]:
|
||||
ctx.attrs._python_toolchain[PythonToolchainInfo].interpreter,
|
||||
node_toolchain.build_node_modules[DefaultInfo].default_outputs,
|
||||
out.as_output(),
|
||||
"--package", ctx.attrs.package,
|
||||
"--package-lock", ctx.attrs.package_lock,
|
||||
"--bin-dir", node_toolchain.bin_dir[DefaultInfo].default_outputs,
|
||||
"--package",
|
||||
ctx.attrs.package,
|
||||
"--package-lock",
|
||||
ctx.attrs.package_lock,
|
||||
"--bin-dir",
|
||||
node_toolchain.bin_dir[DefaultInfo].default_outputs,
|
||||
],
|
||||
category = "npm",
|
||||
)
|
||||
@ -27,13 +30,13 @@ node_modules = rule(
|
||||
"package_lock": attrs.source(),
|
||||
"_node_toolchain": attrs.toolchain_dep(
|
||||
default = "toolchains//:node",
|
||||
providers=[NodeToolchainInfo]
|
||||
providers = [NodeToolchainInfo],
|
||||
),
|
||||
"_python_toolchain": attrs.toolchain_dep(
|
||||
default = "toolchains//:python",
|
||||
providers=[PythonToolchainInfo]
|
||||
providers = [PythonToolchainInfo],
|
||||
),
|
||||
}
|
||||
},
|
||||
)
|
||||
|
||||
def _npm_bin_impl(ctx: "context") -> [[DefaultInfo.type, RunInfo.type]]:
|
||||
@ -50,7 +53,8 @@ def _npm_bin_impl(ctx: "context") -> [[DefaultInfo.type, RunInfo.type]]:
|
||||
ctx.attrs.node_modules,
|
||||
bin_name,
|
||||
out.as_output(),
|
||||
"--bin-dir", node_toolchain.bin_dir[DefaultInfo].default_outputs,
|
||||
"--bin-dir",
|
||||
node_toolchain.bin_dir[DefaultInfo].default_outputs,
|
||||
],
|
||||
category = "build_npm_bin",
|
||||
)
|
||||
@ -67,11 +71,11 @@ npm_bin = rule(
|
||||
"node_modules": attrs.source(),
|
||||
"_node_toolchain": attrs.toolchain_dep(
|
||||
default = "toolchains//:node",
|
||||
providers=[NodeToolchainInfo]
|
||||
providers = [NodeToolchainInfo],
|
||||
),
|
||||
"_python_toolchain": attrs.toolchain_dep(
|
||||
default = "toolchains//:python",
|
||||
providers=[PythonToolchainInfo]
|
||||
providers = [PythonToolchainInfo],
|
||||
),
|
||||
}
|
||||
},
|
||||
)
|
||||
|
@ -24,11 +24,11 @@ node_toolchain = rule(
|
||||
impl = _node_toolchain_impl,
|
||||
attrs = {
|
||||
"bin_dir": attrs.dep(
|
||||
default="prelude-nri//node:bin"
|
||||
default = "prelude-nri//node:bin",
|
||||
),
|
||||
"node": attrs.dep(
|
||||
providers = [RunInfo],
|
||||
default="prelude-nri//node:node"
|
||||
default = "prelude-nri//node:node",
|
||||
),
|
||||
"_build_node_modules": attrs.dep(
|
||||
default = "prelude-nri//node:build_node_modules.py",
|
||||
|
Loading…
Reference in New Issue
Block a user