organization because it was terrible before and hard to maintain. Now it should be much easier and there is still of a design decisions to figure out
26 lines
423 B
Lua
26 lines
423 B
Lua
local M = {}
|
|
|
|
---@param opts table
|
|
M.template = function(opts)
|
|
local n = opts.project_name
|
|
local template = [=[
|
|
[build-system]
|
|
requires = ["hatchling"]
|
|
build-backend = "hatchling.build"
|
|
|
|
[project]
|
|
name = "%s"
|
|
version = "0.1.0"
|
|
description = "Project %s"
|
|
readme = "README.md"
|
|
requires-python = ">=3.10"
|
|
dependencies = []
|
|
|
|
[project.scripts]
|
|
%s = "%s.main:main"
|
|
]=]
|
|
return string.format(template, n, n, n, n)
|
|
end
|
|
|
|
return M
|