mirror of
https://github.com/pesde-pkg/hello.git
synced 2024-12-12 03:10:37 +00:00
docs: add documentation
This commit is contained in:
parent
3b9b33ff80
commit
fab55a3db7
3 changed files with 41 additions and 1 deletions
38
docs/intro.md
Normal file
38
docs/intro.md
Normal file
|
@ -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
|
||||
```
|
|
@ -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 <luka@lukadev.me> (https://lukadev.me)"]
|
||||
repository = "https://github.com/lukadev-0/pesde-hello"
|
||||
|
|
|
@ -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})`
|
||||
|
|
Loading…
Reference in a new issue