mirror of
https://github.com/lune-org/lune.git
synced 2024-12-13 05:20:37 +00:00
Version 0.0.6
* Also add task lib to example
This commit is contained in:
parent
8020d93144
commit
76f21076f9
6 changed files with 32 additions and 11 deletions
|
@ -26,6 +26,27 @@ end
|
||||||
--[==[
|
--[==[
|
||||||
EXAMPLE #3
|
EXAMPLE #3
|
||||||
|
|
||||||
|
Spawning tasks
|
||||||
|
]==]
|
||||||
|
|
||||||
|
task.spawn(function()
|
||||||
|
print("\nSpawned a task that will run instantly but not block")
|
||||||
|
task.wait(5)
|
||||||
|
end)
|
||||||
|
|
||||||
|
print("Spawning a delayed task that will run in 5 seconds")
|
||||||
|
task.delay(5, function()
|
||||||
|
print()
|
||||||
|
print("...")
|
||||||
|
task.wait(1)
|
||||||
|
print("Hello again!")
|
||||||
|
task.wait(1)
|
||||||
|
print("Goodbye again! 🌙")
|
||||||
|
end)
|
||||||
|
|
||||||
|
--[==[
|
||||||
|
EXAMPLE #4
|
||||||
|
|
||||||
Get & set environment variables
|
Get & set environment variables
|
||||||
|
|
||||||
Checks if environment variables are empty or not,
|
Checks if environment variables are empty or not,
|
||||||
|
@ -45,7 +66,7 @@ for key, value in process.env do
|
||||||
end
|
end
|
||||||
|
|
||||||
--[==[
|
--[==[
|
||||||
EXAMPLE #4
|
EXAMPLE #5
|
||||||
|
|
||||||
Read files in the current directory
|
Read files in the current directory
|
||||||
|
|
||||||
|
@ -88,7 +109,7 @@ end
|
||||||
-- since the ping command does not work in azure
|
-- since the ping command does not work in azure
|
||||||
if not process.env.GITHUB_ACTIONS then
|
if not process.env.GITHUB_ACTIONS then
|
||||||
--[==[
|
--[==[
|
||||||
EXAMPLE #5
|
EXAMPLE #6
|
||||||
|
|
||||||
Call out to another program / executable
|
Call out to another program / executable
|
||||||
|
|
||||||
|
@ -103,7 +124,7 @@ if not process.env.GITHUB_ACTIONS then
|
||||||
})
|
})
|
||||||
|
|
||||||
--[==[
|
--[==[
|
||||||
EXAMPLE #6
|
EXAMPLE #7
|
||||||
|
|
||||||
Using the result of a spawned process, exiting the process
|
Using the result of a spawned process, exiting the process
|
||||||
|
|
||||||
|
@ -130,7 +151,7 @@ if not process.env.GITHUB_ACTIONS then
|
||||||
end
|
end
|
||||||
|
|
||||||
--[==[
|
--[==[
|
||||||
EXAMPLE #7
|
EXAMPLE #8
|
||||||
|
|
||||||
Using the built-in networking library
|
Using the built-in networking library
|
||||||
]==]
|
]==]
|
||||||
|
@ -167,7 +188,7 @@ assert(apiResponse.body == "bar", "Invalid json response")
|
||||||
print("Got valid JSON response with changes applied")
|
print("Got valid JSON response with changes applied")
|
||||||
|
|
||||||
--[==[
|
--[==[
|
||||||
EXAMPLE #8
|
EXAMPLE #9
|
||||||
|
|
||||||
Using the console library to print pretty
|
Using the console library to print pretty
|
||||||
]==]
|
]==]
|
||||||
|
@ -196,7 +217,7 @@ print(string.rep("—", 22))
|
||||||
console.resetColor()
|
console.resetColor()
|
||||||
|
|
||||||
--[==[
|
--[==[
|
||||||
EXAMPLE #9
|
EXAMPLE #10
|
||||||
|
|
||||||
Saying goodbye 😔
|
Saying goodbye 😔
|
||||||
]==]
|
]==]
|
||||||
|
|
|
@ -5,7 +5,7 @@ All notable changes to this project will be documented in this file.
|
||||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||||
|
|
||||||
## Unreleased
|
## `0.0.6` - January 23rd, 2023
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
||||||
|
|
2
Cargo.lock
generated
2
Cargo.lock
generated
|
@ -471,7 +471,7 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "lune"
|
name = "lune"
|
||||||
version = "0.0.5"
|
version = "0.0.6"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"clap",
|
"clap",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "lune"
|
name = "lune"
|
||||||
version = "0.0.5"
|
version = "0.0.6"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
license = "MPL 2.0"
|
license = "MPL 2.0"
|
||||||
repository = "https://github.com/filiptibell/lune"
|
repository = "https://github.com/filiptibell/lune"
|
||||||
|
|
2
lune.yml
2
lune.yml
|
@ -1,4 +1,4 @@
|
||||||
# Lune v0.0.5
|
# Lune v0.0.6
|
||||||
---
|
---
|
||||||
globals:
|
globals:
|
||||||
# Console
|
# Console
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
-- Lune v0.0.5
|
-- Lune v0.0.6
|
||||||
|
|
||||||
declare console: {
|
declare console: {
|
||||||
resetColor: () -> (),
|
resetColor: () -> (),
|
||||||
|
|
Loading…
Reference in a new issue