Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions DependencyControl.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"dependencyControlFeedFormatVersion": "0.4.0",
"name": "Yutils",
"description": "An ASS typeset utilities library.",
"baseUrl": "https://github.com/TypesettingTools/Yutils",
"url": "@{baseUrl}",
"maintainer": "TypesettingTools",
"modules": {
"tstools.Yutils": {
"name": "Yutils",
"description": "An ASS typeset utilities library.",
"author": "Christoph \"Youka\" Spanknebel",
"url": "@{baseUrl}",
"channels": {
"main": {
"version": "1.0.0",
"released": "2026-07-24",
"default": true,
"files": [
{
"name": ".lua",
"url": "https://raw.githubusercontent.com/TypesettingTools/Yutils/v@{version}/src/Yutils.lua",
"sha1": "3439D32F109F40EF24EFECE6C2A3C0AB0B314EE0"
}
],
"provides": [
{
"name": "Yutils"
}
]
}
},
"changelog": {
"1.0.0": [
"feat: Yutils can now be installed and updated through DependencyControl as `tstools.Yutils`, and provides the bare `Yutils` module name so existing scripts keep working unchanged."
]
}
}
}
}
18 changes: 18 additions & 0 deletions src/Yutils.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3530,5 +3530,23 @@ if ({...})[1] then
_G.Yutils = Yutils
end

-- DependencyControl integration
-- DependencyControl's module loader calls this hook when it loads the library. Constructing the
-- record registers the module under its namespace and registers the bare "Yutils" alias, so scripts
-- can keep requiring "Yutils" although the file installs to tstools/Yutils.lua. Loading the library
-- without DependencyControl never calls this hook and leaves the library unchanged.
function Yutils.__depCtrlInit(DependencyControl)
Yutils.version = DependencyControl({
name = "Yutils",
version = "1.0.0",
description = "An ASS typeset utilities library.",
author = "Christoph \"Youka\" Spanknebel",
moduleName = "tstools.Yutils",
url = "https://github.com/TypesettingTools/Yutils",
feed = "https://raw.githubusercontent.com/TypesettingTools/Yutils/master/DependencyControl.json",
provides = {"Yutils"}
})
end

-- Return library to script loader
return Yutils