diff options
| author | William Boman <william@redwill.se> | 2023-04-22 12:22:54 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-04-22 12:22:54 +0200 |
| commit | e239c6439cad2f4c9bd247775815e0be3741621c (patch) | |
| tree | 188a3c704a280c396f0534d068d1f9f393255a27 /scripts/lua/mason-scripts/utils.lua | |
| parent | chore: autogenerate (#1245) (diff) | |
| download | mason-e239c6439cad2f4c9bd247775815e0be3741621c.tar mason-e239c6439cad2f4c9bd247775815e0be3741621c.tar.gz mason-e239c6439cad2f4c9bd247775815e0be3741621c.tar.bz2 mason-e239c6439cad2f4c9bd247775815e0be3741621c.tar.lz mason-e239c6439cad2f4c9bd247775815e0be3741621c.tar.xz mason-e239c6439cad2f4c9bd247775815e0be3741621c.tar.zst mason-e239c6439cad2f4c9bd247775815e0be3741621c.zip | |
chore: remove generate scripts and artifacts (#1246)
Diffstat (limited to 'scripts/lua/mason-scripts/utils.lua')
| -rw-r--r-- | scripts/lua/mason-scripts/utils.lua | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/scripts/lua/mason-scripts/utils.lua b/scripts/lua/mason-scripts/utils.lua deleted file mode 100644 index 55d86824..00000000 --- a/scripts/lua/mason-scripts/utils.lua +++ /dev/null @@ -1,33 +0,0 @@ -local Path = require "mason-core.path" -local _ = require "mason-core.functional" -local fs = require "mason-core.fs" - -local M = {} - ----@async ----@param path string ----@param contents string ----@param flags string? -function M.write_file(path, contents, flags) - local header = _.cond { - { _.matches "%.md$", _.always { "<!--- THIS FILE IS GENERATED. DO NOT EDIT MANUALLY. -->" } }, - { - _.matches "%.lua$", - _.always { - "-- THIS FILE IS GENERATED. DO NOT EDIT MANUALLY.", - "-- stylua: ignore start", - }, - }, - { _.T, _.always { "// THIS FILE IS GENERATED. DO NOT EDIT MANUALLY." } }, - }(path) - fs.async.write_file(path, _.join("\n", _.concat(header, { contents })), flags) -end - ----@param path string ----@return string -function M.rel_path(path) - local script_path = debug.getinfo(2, "S").source:sub(2):match "(.*/)" - return Path.concat { script_path, path } -end - -return M |
