From fab55a3db725ee5eefe7fc2e3524a387b4e6086e Mon Sep 17 00:00:00 2001 From: LukaDev <47296785+lukadev-0@users.noreply.github.com> Date: Tue, 29 Oct 2024 21:06:05 +0100 Subject: [PATCH] docs: add documentation --- docs/intro.md | 38 ++++++++++++++++++++++++++++++++++++++ pesde-base.toml | 2 +- scripts/build.luau | 2 ++ 3 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 docs/intro.md diff --git a/docs/intro.md b/docs/intro.md new file mode 100644 index 0000000..bb5a0d9 --- /dev/null +++ b/docs/intro.md @@ -0,0 +1,38 @@ +# Introduction + +The `pesde/hello` package is intended to be used in examples. + +It exports a library and a binary, both of which prints a simple greeting. + +## Installation + +The package can be installed with the following command: + +```sh +pesde add pesde/hello +``` + +## Library + +The library is a single function that prints hello. + +```luau +local hello = require("./luau_packages/hello") + +hello() +``` + +## Binary + +The binary prints hello. You can either run it using `hello` after installing +the package in a pesde project like this: + +```sh +hello +``` + +Or you can run it anywhere using `pesde x` like this: + +```sh +pesde x pesde/hello +``` diff --git a/pesde-base.toml b/pesde-base.toml index 9e6a4a6..3988b7b 100644 --- a/pesde-base.toml +++ b/pesde-base.toml @@ -1,5 +1,5 @@ name = "pesde/hello" -version = "1.0.1" +version = "1.0.2" description = "Prints hello. Intended for use in examples." authors = ["LukaDev (https://lukadev.me)"] repository = "https://github.com/lukadev-0/pesde-hello" diff --git a/scripts/build.luau b/scripts/build.luau index 6b65666..4ed13e8 100644 --- a/scripts/build.luau +++ b/scripts/build.luau @@ -48,10 +48,12 @@ for targetName, target in TARGETS do "pesde.toml", "README.md", "LICENSE", + "docs", } fs.copy("LICENSE", `{outDir}/LICENSE`) fs.copy("README.md", `{outDir}/README.md`) + fs.copy("docs", `{outDir}/docs`) if target.lib then local message = `Hello, pesde! ({manifest.name}@{manifest.version}, {targetName})`