docs: include README & LICENSE in scripts packages

This commit is contained in:
daimond113 2024-12-08 16:05:52 +01:00
parent 2c852e0466
commit dafb986a47
Signed by untrusted user who does not match committer: DevComp
GPG key ID: 429EF1C337871656
4 changed files with 50 additions and 9 deletions

View file

@ -40,6 +40,19 @@ end
]],
}
local README_TMPL = [[# `pesde/scripts_%s`
Common scripts intended for use with %s.
## Included scripts
### roblox_sync_config_generator
Generates a %s sync config for pesde Roblox packages.
### sourcemap_generator
Prints out a sourcemap for Wally dependencies for type extraction.
]]
local function logPrefix(type: "error" | "info")
local statusColor: stdio.Color = if type == "error"
then "red"
@ -116,19 +129,28 @@ for tool, generators in lib.generators do
pathfs.writeDir(toolScriptsDir)
end
local capitalisedToolChoice = string.gsub(toolChoice, "^%l", string.upper)
-- Define the manifest for the tool
local toolManifest: manifest.PesdeManifest = {
name = `pesde/scripts_{toolChoice}`,
version = toolMeta.version,
-- For the description, we capitalize the first letter of the tool name here
-- since it is a proper noun
description = `Scripts for {string.gsub(toolChoice, "^%l", string.upper)}-based Roblox projects.`,
description = `Scripts for {capitalisedToolChoice}-based Roblox projects.`,
authors = {
"daimond113 <contact@daimond113.com> (https://www.daimond113.com/)",
"Erica Marigold <hi@devcomp.xyz>",
},
repository = "https://github.com/pesde-pkg/scripts",
license = "MIT",
includes = {
"roblox_sync_config_generator.luau",
"sourcemap_generator.luau",
"pesde.toml",
"README.md",
"LICENSE",
},
target = {
environment = "lune",
@ -156,6 +178,11 @@ for tool, generators in lib.generators do
pathfs.writeFile(toolScriptsDir:join("pesde.toml"), serde.encode("toml", toolManifest, true))
pathfs.writeFile(toolScriptsDir:join("roblox_sync_config_generator.luau"), syncConfigGeneratorScript)
pathfs.writeFile(toolScriptsDir:join("sourcemap_generator.luau"), sourcemapGeneratorScript)
pathfs.writeFile(
toolScriptsDir:join("README.md"),
string.format(README_TMPL, toolChoice, capitalisedToolChoice, capitalisedToolChoice)
)
pathfs.copy(pathfs.cwd:join("LICENSE"), toolScriptsDir:join("LICENSE"), true)
stdio.write(
`{INFO_PREFIX} Generated script project for tool {toolChoice} ({stdio.style("dim")}{string.format(

21
LICENSE Normal file
View file

@ -0,0 +1,21 @@
MIT License
Copyright (c) 2024 pesde-pkg
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View file

@ -1,7 +0,0 @@
Copyright © 2024 pesde-pkg
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View file

@ -13,7 +13,7 @@ includes = [
"!src/**/*.spec.luau",
"pesde.toml",
"README.md",
"LICENSE.md",
"LICENSE",
]
workspace_members = [".", ".pesde/rojo"]