ticbuild 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (290) hide show
  1. package/.attachments/support_me_on_kofi_beige.png +0 -0
  2. package/.env.example +3 -0
  3. package/.prettierignore +10 -0
  4. package/LICENSE +15 -0
  5. package/README.md +429 -0
  6. package/debug/obj/resolvedManifest.ticbuild.jsonc +108 -0
  7. package/dist/backend/ImportedResource.d.ts +11 -0
  8. package/dist/backend/ImportedResource.d.ts.map +1 -0
  9. package/dist/backend/ImportedResource.js +53 -0
  10. package/dist/backend/ImportedResource.js.map +1 -0
  11. package/dist/backend/ImportedResourceTypes.d.ts +24 -0
  12. package/dist/backend/ImportedResourceTypes.d.ts.map +1 -0
  13. package/dist/backend/ImportedResourceTypes.js +35 -0
  14. package/dist/backend/ImportedResourceTypes.js.map +1 -0
  15. package/dist/backend/codeBanking.test.d.ts +2 -0
  16. package/dist/backend/codeBanking.test.d.ts.map +1 -0
  17. package/dist/backend/codeBanking.test.js.map +1 -0
  18. package/dist/backend/importResources.d.ts +4 -0
  19. package/dist/backend/importResources.d.ts.map +1 -0
  20. package/dist/backend/importResources.js +58 -0
  21. package/dist/backend/importResources.js.map +1 -0
  22. package/dist/backend/importUtils.d.ts +14 -0
  23. package/dist/backend/importUtils.d.ts.map +1 -0
  24. package/dist/backend/importUtils.js +77 -0
  25. package/dist/backend/importUtils.js.map +1 -0
  26. package/dist/backend/importers/LuaCodeImporter.d.ts +47 -0
  27. package/dist/backend/importers/LuaCodeImporter.d.ts.map +1 -0
  28. package/dist/backend/importers/LuaCodeImporter.js +196 -0
  29. package/dist/backend/importers/LuaCodeImporter.js.map +1 -0
  30. package/dist/backend/importers/LuaCodeImporter.test.d.ts +2 -0
  31. package/dist/backend/importers/LuaCodeImporter.test.d.ts.map +1 -0
  32. package/dist/backend/importers/LuaCodeImporter.test.js.map +1 -0
  33. package/dist/backend/importers/binaryResourceImporter.d.ts +22 -0
  34. package/dist/backend/importers/binaryResourceImporter.d.ts.map +1 -0
  35. package/dist/backend/importers/binaryResourceImporter.js +53 -0
  36. package/dist/backend/importers/binaryResourceImporter.js.map +1 -0
  37. package/dist/backend/importers/luaImporter.d.ts +1 -0
  38. package/dist/backend/importers/luaImporter.d.ts.map +1 -0
  39. package/dist/backend/importers/luaImporter.js +3 -0
  40. package/dist/backend/importers/luaImporter.js.map +1 -0
  41. package/dist/backend/importers/textResourceImporter.d.ts +23 -0
  42. package/dist/backend/importers/textResourceImporter.d.ts.map +1 -0
  43. package/dist/backend/importers/textResourceImporter.js +55 -0
  44. package/dist/backend/importers/textResourceImporter.js.map +1 -0
  45. package/dist/backend/importers/tic80CartImporter.d.ts +21 -0
  46. package/dist/backend/importers/tic80CartImporter.d.ts.map +1 -0
  47. package/dist/backend/importers/tic80CartImporter.js +96 -0
  48. package/dist/backend/importers/tic80CartImporter.js.map +1 -0
  49. package/dist/backend/loadAllImports.d.ts +1 -0
  50. package/dist/backend/loadAllImports.d.ts.map +1 -0
  51. package/dist/backend/loadAllImports.js +3 -0
  52. package/dist/backend/loadAllImports.js.map +1 -0
  53. package/dist/backend/luaBinaryEncoding.d.ts +6 -0
  54. package/dist/backend/luaBinaryEncoding.d.ts.map +1 -0
  55. package/dist/backend/luaBinaryEncoding.js +94 -0
  56. package/dist/backend/luaBinaryEncoding.js.map +1 -0
  57. package/dist/backend/luaPreprocessor.d.ts +8 -0
  58. package/dist/backend/luaPreprocessor.d.ts.map +1 -0
  59. package/dist/backend/luaPreprocessor.js +862 -0
  60. package/dist/backend/luaPreprocessor.js.map +1 -0
  61. package/dist/backend/luaPreprocessor.test.d.ts +2 -0
  62. package/dist/backend/luaPreprocessor.test.d.ts.map +1 -0
  63. package/dist/backend/luaPreprocessor.test.js.map +1 -0
  64. package/dist/backend/manifestLoader.d.ts +19 -0
  65. package/dist/backend/manifestLoader.d.ts.map +1 -0
  66. package/dist/backend/manifestLoader.js +142 -0
  67. package/dist/backend/manifestLoader.js.map +1 -0
  68. package/dist/backend/manifestLoader.test.d.ts +2 -0
  69. package/dist/backend/manifestLoader.test.d.ts.map +1 -0
  70. package/dist/backend/manifestLoader.test.js.map +1 -0
  71. package/dist/backend/manifestTypes.d.ts +454 -0
  72. package/dist/backend/manifestTypes.d.ts.map +1 -0
  73. package/dist/backend/manifestTypes.js +28 -0
  74. package/dist/backend/manifestTypes.js.map +1 -0
  75. package/dist/backend/project.d.ts +24 -0
  76. package/dist/backend/project.d.ts.map +1 -0
  77. package/dist/backend/project.js +159 -0
  78. package/dist/backend/project.js.map +1 -0
  79. package/dist/backend/projectCore.d.ts +34 -0
  80. package/dist/backend/projectCore.d.ts.map +1 -0
  81. package/dist/backend/projectCore.js +226 -0
  82. package/dist/backend/projectCore.js.map +1 -0
  83. package/dist/backend/tic80Resolver.d.ts +6 -0
  84. package/dist/backend/tic80Resolver.d.ts.map +1 -0
  85. package/dist/backend/tic80Resolver.js +66 -0
  86. package/dist/backend/tic80Resolver.js.map +1 -0
  87. package/dist/buildInfo.d.ts +9 -0
  88. package/dist/buildInfo.d.ts.map +1 -0
  89. package/dist/buildInfo.js +13 -0
  90. package/dist/buildInfo.js.map +1 -0
  91. package/dist/frontend/build.d.ts +3 -0
  92. package/dist/frontend/build.d.ts.map +1 -0
  93. package/dist/frontend/build.js +8 -0
  94. package/dist/frontend/build.js.map +1 -0
  95. package/dist/frontend/codeBankWarnings.test.d.ts +2 -0
  96. package/dist/frontend/codeBankWarnings.test.d.ts.map +1 -0
  97. package/dist/frontend/codeBankWarnings.test.js.map +1 -0
  98. package/dist/frontend/core.d.ts +3 -0
  99. package/dist/frontend/core.d.ts.map +1 -0
  100. package/dist/frontend/core.js +259 -0
  101. package/dist/frontend/core.js.map +1 -0
  102. package/dist/frontend/init.d.ts +7 -0
  103. package/dist/frontend/init.d.ts.map +1 -0
  104. package/dist/frontend/init.js +95 -0
  105. package/dist/frontend/init.js.map +1 -0
  106. package/dist/frontend/parseOptions.d.ts +7 -0
  107. package/dist/frontend/parseOptions.d.ts.map +1 -0
  108. package/dist/frontend/parseOptions.js +68 -0
  109. package/dist/frontend/parseOptions.js.map +1 -0
  110. package/dist/frontend/run.d.ts +3 -0
  111. package/dist/frontend/run.d.ts.map +1 -0
  112. package/dist/frontend/run.js +63 -0
  113. package/dist/frontend/run.js.map +1 -0
  114. package/dist/frontend/watch.d.ts +3 -0
  115. package/dist/frontend/watch.d.ts.map +1 -0
  116. package/dist/frontend/watch.js +208 -0
  117. package/dist/frontend/watch.js.map +1 -0
  118. package/dist/index.d.ts +3 -0
  119. package/dist/index.d.ts.map +1 -0
  120. package/dist/index.js +191 -0
  121. package/dist/index.js.map +1 -0
  122. package/dist/obj/resolvedManifest.ticbuild.jsonc +110 -0
  123. package/dist/obj/variables.json +19 -0
  124. package/dist/utils/algorithms.d.ts +4 -0
  125. package/dist/utils/algorithms.d.ts.map +1 -0
  126. package/dist/utils/algorithms.js +15 -0
  127. package/dist/utils/algorithms.js.map +1 -0
  128. package/dist/utils/algorithms.test.d.ts +2 -0
  129. package/dist/utils/algorithms.test.d.ts.map +1 -0
  130. package/dist/utils/algorithms.test.js.map +1 -0
  131. package/dist/utils/bin.d.ts +4 -0
  132. package/dist/utils/bin.d.ts.map +1 -0
  133. package/dist/utils/bin.js +16 -0
  134. package/dist/utils/bin.js.map +1 -0
  135. package/dist/utils/charMap.d.ts +28 -0
  136. package/dist/utils/charMap.d.ts.map +1 -0
  137. package/dist/utils/charMap.js +31 -0
  138. package/dist/utils/charMap.js.map +1 -0
  139. package/dist/utils/console.d.ts +10 -0
  140. package/dist/utils/console.d.ts.map +1 -0
  141. package/dist/utils/console.js +66 -0
  142. package/dist/utils/console.js.map +1 -0
  143. package/dist/utils/encoding/b85.d.ts +5 -0
  144. package/dist/utils/encoding/b85.d.ts.map +1 -0
  145. package/dist/utils/encoding/b85.js +136 -0
  146. package/dist/utils/encoding/b85.js.map +1 -0
  147. package/dist/utils/encoding/codecRegistry.d.ts +333 -0
  148. package/dist/utils/encoding/codecRegistry.d.ts.map +1 -0
  149. package/dist/utils/encoding/codecRegistry.js +81 -0
  150. package/dist/utils/encoding/codecRegistry.js.map +1 -0
  151. package/dist/utils/encoding/hex.d.ts +3 -0
  152. package/dist/utils/encoding/hex.d.ts.map +1 -0
  153. package/dist/utils/encoding/hex.js +30 -0
  154. package/dist/utils/encoding/hex.js.map +1 -0
  155. package/dist/utils/encoding/lz.d.ts +12 -0
  156. package/dist/utils/encoding/lz.d.ts.map +1 -0
  157. package/dist/utils/encoding/lz.js +271 -0
  158. package/dist/utils/encoding/lz.js.map +1 -0
  159. package/dist/utils/enum.d.ts +45 -0
  160. package/dist/utils/enum.d.ts.map +1 -0
  161. package/dist/utils/enum.js +135 -0
  162. package/dist/utils/enum.js.map +1 -0
  163. package/dist/utils/errorHandling.d.ts +13 -0
  164. package/dist/utils/errorHandling.d.ts.map +1 -0
  165. package/dist/utils/errorHandling.js +18 -0
  166. package/dist/utils/errorHandling.js.map +1 -0
  167. package/dist/utils/fileSystem.d.ts +16 -0
  168. package/dist/utils/fileSystem.d.ts.map +1 -0
  169. package/dist/utils/fileSystem.js +161 -0
  170. package/dist/utils/fileSystem.js.map +1 -0
  171. package/dist/utils/help.d.ts +7 -0
  172. package/dist/utils/help.d.ts.map +1 -0
  173. package/dist/utils/help.js +87 -0
  174. package/dist/utils/help.js.map +1 -0
  175. package/dist/utils/lua/luaUtils.d.ts +1 -0
  176. package/dist/utils/lua/luaUtils.d.ts.map +1 -0
  177. package/dist/utils/lua/luaUtils.js +3 -0
  178. package/dist/utils/lua/luaUtils.js.map +1 -0
  179. package/dist/utils/lua/lua_alias_expressions.d.ts +20 -0
  180. package/dist/utils/lua/lua_alias_expressions.d.ts.map +1 -0
  181. package/dist/utils/lua/lua_alias_expressions.js +233 -0
  182. package/dist/utils/lua/lua_alias_expressions.js.map +1 -0
  183. package/dist/utils/lua/lua_alias_literals.d.ts +20 -0
  184. package/dist/utils/lua/lua_alias_literals.d.ts.map +1 -0
  185. package/dist/utils/lua/lua_alias_literals.js +165 -0
  186. package/dist/utils/lua/lua_alias_literals.js.map +1 -0
  187. package/dist/utils/lua/lua_alias_shared.d.ts +31 -0
  188. package/dist/utils/lua/lua_alias_shared.d.ts.map +1 -0
  189. package/dist/utils/lua/lua_alias_shared.js +415 -0
  190. package/dist/utils/lua/lua_alias_shared.js.map +1 -0
  191. package/dist/utils/lua/lua_ast.d.ts +9 -0
  192. package/dist/utils/lua/lua_ast.d.ts.map +1 -0
  193. package/dist/utils/lua/lua_ast.js +90 -0
  194. package/dist/utils/lua/lua_ast.js.map +1 -0
  195. package/dist/utils/lua/lua_fundamentals.d.ts +14 -0
  196. package/dist/utils/lua/lua_fundamentals.d.ts.map +1 -0
  197. package/dist/utils/lua/lua_fundamentals.js +93 -0
  198. package/dist/utils/lua/lua_fundamentals.js.map +1 -0
  199. package/dist/utils/lua/lua_pack_locals.d.ts +3 -0
  200. package/dist/utils/lua/lua_pack_locals.d.ts.map +1 -0
  201. package/dist/utils/lua/lua_pack_locals.js +206 -0
  202. package/dist/utils/lua/lua_pack_locals.js.map +1 -0
  203. package/dist/utils/lua/lua_processor.d.ts +65 -0
  204. package/dist/utils/lua/lua_processor.d.ts.map +1 -0
  205. package/dist/utils/lua/lua_processor.js +1153 -0
  206. package/dist/utils/lua/lua_processor.js.map +1 -0
  207. package/dist/utils/lua/lua_processor.test.d.ts +2 -0
  208. package/dist/utils/lua/lua_processor.test.d.ts.map +1 -0
  209. package/dist/utils/lua/lua_processor.test.js.map +1 -0
  210. package/dist/utils/lua/lua_remove_unused_functions.d.ts +6 -0
  211. package/dist/utils/lua/lua_remove_unused_functions.d.ts.map +1 -0
  212. package/dist/utils/lua/lua_remove_unused_functions.js +474 -0
  213. package/dist/utils/lua/lua_remove_unused_functions.js.map +1 -0
  214. package/dist/utils/lua/lua_remove_unused_locals.d.ts +3 -0
  215. package/dist/utils/lua/lua_remove_unused_locals.d.ts.map +1 -0
  216. package/dist/utils/lua/lua_remove_unused_locals.js +303 -0
  217. package/dist/utils/lua/lua_remove_unused_locals.js.map +1 -0
  218. package/dist/utils/lua/lua_rename_allowed_table_keys.d.ts +3 -0
  219. package/dist/utils/lua/lua_rename_allowed_table_keys.d.ts.map +1 -0
  220. package/dist/utils/lua/lua_rename_allowed_table_keys.js +157 -0
  221. package/dist/utils/lua/lua_rename_allowed_table_keys.js.map +1 -0
  222. package/dist/utils/lua/lua_rename_table_fields.d.ts +3 -0
  223. package/dist/utils/lua/lua_rename_table_fields.d.ts.map +1 -0
  224. package/dist/utils/lua/lua_rename_table_fields.js +427 -0
  225. package/dist/utils/lua/lua_rename_table_fields.js.map +1 -0
  226. package/dist/utils/lua/lua_renamer.d.ts +3 -0
  227. package/dist/utils/lua/lua_renamer.d.ts.map +1 -0
  228. package/dist/utils/lua/lua_renamer.js +229 -0
  229. package/dist/utils/lua/lua_renamer.js.map +1 -0
  230. package/dist/utils/lua/lua_simplify.d.ts +3 -0
  231. package/dist/utils/lua/lua_simplify.d.ts.map +1 -0
  232. package/dist/utils/lua/lua_simplify.js +541 -0
  233. package/dist/utils/lua/lua_simplify.js.map +1 -0
  234. package/dist/utils/lua/lua_utils.d.ts +13 -0
  235. package/dist/utils/lua/lua_utils.d.ts.map +1 -0
  236. package/dist/utils/lua/lua_utils.js +58 -0
  237. package/dist/utils/lua/lua_utils.js.map +1 -0
  238. package/dist/utils/math.d.ts +2 -0
  239. package/dist/utils/math.d.ts.map +1 -0
  240. package/dist/utils/math.js +7 -0
  241. package/dist/utils/math.js.map +1 -0
  242. package/dist/utils/math.test.d.ts +2 -0
  243. package/dist/utils/math.test.d.ts.map +1 -0
  244. package/dist/utils/math.test.js.map +1 -0
  245. package/dist/utils/templates.d.ts +3 -0
  246. package/dist/utils/templates.d.ts.map +1 -0
  247. package/dist/utils/templates.js +57 -0
  248. package/dist/utils/templates.js.map +1 -0
  249. package/dist/utils/tic80/bankSupport.test.d.ts +2 -0
  250. package/dist/utils/tic80/bankSupport.test.d.ts.map +1 -0
  251. package/dist/utils/tic80/bankSupport.test.js.map +1 -0
  252. package/dist/utils/tic80/cartLoader.d.ts +3 -0
  253. package/dist/utils/tic80/cartLoader.d.ts.map +1 -0
  254. package/dist/utils/tic80/cartLoader.js +54 -0
  255. package/dist/utils/tic80/cartLoader.js.map +1 -0
  256. package/dist/utils/tic80/cartWriter.d.ts +5 -0
  257. package/dist/utils/tic80/cartWriter.d.ts.map +1 -0
  258. package/dist/utils/tic80/cartWriter.js +95 -0
  259. package/dist/utils/tic80/cartWriter.js.map +1 -0
  260. package/dist/utils/tic80/launch.d.ts +4 -0
  261. package/dist/utils/tic80/launch.d.ts.map +1 -0
  262. package/dist/utils/tic80/launch.js +36 -0
  263. package/dist/utils/tic80/launch.js.map +1 -0
  264. package/dist/utils/tic80/tic80.d.ts +1149 -0
  265. package/dist/utils/tic80/tic80.d.ts.map +1 -0
  266. package/dist/utils/tic80/tic80.js +114 -0
  267. package/dist/utils/tic80/tic80.js.map +1 -0
  268. package/dist/utils/utils.d.ts +13 -0
  269. package/dist/utils/utils.d.ts.map +1 -0
  270. package/dist/utils/utils.js +109 -0
  271. package/dist/utils/utils.js.map +1 -0
  272. package/dist/utils/versionString.d.ts +12 -0
  273. package/dist/utils/versionString.d.ts.map +1 -0
  274. package/dist/utils/versionString.js +33 -0
  275. package/dist/utils/versionString.js.map +1 -0
  276. package/dist/utils/windowPosition.d.ts +10 -0
  277. package/dist/utils/windowPosition.d.ts.map +1 -0
  278. package/dist/utils/windowPosition.js +222 -0
  279. package/dist/utils/windowPosition.js.map +1 -0
  280. package/example.ticbuild.jsonc +94 -0
  281. package/package.json +51 -0
  282. package/templates/help/build.txt +23 -0
  283. package/templates/help/init.txt +23 -0
  284. package/templates/help/main.txt +41 -0
  285. package/templates/help/run.txt +22 -0
  286. package/templates/help/tic80.txt +8 -0
  287. package/templates/help/watch.txt +24 -0
  288. package/templates/minimal/project.ticbuild.jsonc +43 -0
  289. package/ticbuild-1.0.0.tgz +0 -0
  290. package/ticbuild.schema.json +327 -0
package/package.json ADDED
@@ -0,0 +1,51 @@
1
+ {
2
+ "name": "ticbuild",
3
+ "version": "1.0.0",
4
+ "description": "A build & watch system for TIC-80",
5
+ "main": "dist/index.js",
6
+ "bin": {
7
+ "ticbuild": "./dist/index.js"
8
+ },
9
+ "scripts": {
10
+ "prepare": "cross-env NODE_ENV=production npm run build",
11
+ "prebuild": "node scripts/gen-build-info.js",
12
+ "build": "tsc",
13
+ "watch": "tsc --watch",
14
+ "start": "node dist/index.js",
15
+ "dev": "tsc && node dist/index.js",
16
+ "test": "jest",
17
+ "test:watch": "jest --watch"
18
+ },
19
+ "keywords": [
20
+ "tic80",
21
+ "build",
22
+ "watch",
23
+ "cli"
24
+ ],
25
+ "author": "Carl Corcoran",
26
+ "repository": {
27
+ "type": "git",
28
+ "url": "https://github.com/thenfour/ticbuild"
29
+ },
30
+ "license": "ISC",
31
+ "devDependencies": {
32
+ "@types/jest": "^29.0.0",
33
+ "@types/node": "^20.0.0",
34
+ "cross-env": "^10.1.0",
35
+ "jest": "^29.0.0",
36
+ "ts-jest": "^29.0.0",
37
+ "ts-node": "^10.9.2",
38
+ "typescript": "^5.0.0"
39
+ },
40
+ "dependencies": {
41
+ "@types/chokidar": "^2.1.7",
42
+ "@types/luaparse": "^0.2.13",
43
+ "ajv": "^8.12.0",
44
+ "chalk": "^4.1.2",
45
+ "chokidar": "^3.6.0",
46
+ "commander": "^11.0.0",
47
+ "dotenv": "^16.0.0",
48
+ "jsonc-parser": "^3.2.0",
49
+ "luaparse": "^0.3.1"
50
+ }
51
+ }
@@ -0,0 +1,23 @@
1
+
2
+ ticbuild build
3
+
4
+ usage: ticbuild build [manifest] [<args>]
5
+
6
+ Build a TIC-80 cart from a manifest file
7
+
8
+ Arguments:
9
+
10
+ [manifest] Path to manifest file (default: first *.ticbuild.jsonc)
11
+
12
+ Options:
13
+
14
+ -m, --mode <name> Build configuration name from manifest
15
+ -v, --var <key=value> Override manifest variable (can be used multiple times)
16
+ -h, --help Show this help message
17
+
18
+ Examples:
19
+
20
+ ticbuild build
21
+ ticbuild build game.ticbuild.jsonc
22
+ ticbuild build --mode release
23
+ ticbuild build --var DEBUG=false --var VERSION=1.0
@@ -0,0 +1,23 @@
1
+
2
+ ticbuild init
3
+
4
+ usage: ticbuild init [options] [dir]
5
+
6
+ Initialize a new ticbuild project with a template
7
+
8
+ Arguments:
9
+
10
+ [dir] Directory to initialize (default: current directory)
11
+
12
+ Options:
13
+
14
+ -n, --name <name> Project name (used in manifest)
15
+ -t, --template <name> Template name: 'minimal' or 'example' (default: example)
16
+ -f, --force Overwrite existing files
17
+ -h, --help Show this help message
18
+
19
+ Examples:
20
+
21
+ ticbuild init
22
+ ticbuild init ./myproject --name "My Game"
23
+ ticbuild init . --template minimal --force
@@ -0,0 +1,41 @@
1
+
2
+ ticbuild {{VERSION}}
3
+ commit: {{COMMIT_HASH}}
4
+ built: {{BUILD_DATE}}
5
+
6
+ usage: ticbuild [-h | --help] [-v | --version] <command> [<args>]
7
+
8
+ A build and watch system for TIC-80 development
9
+
10
+ Common commands:
11
+
12
+ build, b [manifest] Build a TIC-80 cart from manifest
13
+ run, r [manifest] Build and launch TIC-80
14
+ watch, w [manifest] Build, launch, and watch for changes
15
+ init [dir] Initialize a new project
16
+
17
+ Other commands:
18
+
19
+ tic80, t Launch TIC-80 directly
20
+ help [command] Show help for a specific command
21
+
22
+ Use 'ticbuild help <command>' or 'ticbuild <command> --help' for detailed help.
23
+
24
+ Examples:
25
+
26
+ ticbuild build
27
+ Build using first *.ticbuild.jsonc file in current directory
28
+
29
+ ticbuild watch my.ticbuild.jsonc
30
+ Build and watch a specific manifest file
31
+
32
+ ticbuild init ./myproject --name "My Game"
33
+ Initialize a new project in the specified directory
34
+
35
+ ticbuild build --mode release
36
+ Build using the 'release' build configuration
37
+
38
+ Links:
39
+
40
+ GitHub: https://github.com/thenfour/ticbuild
41
+ Somatic: https://somatic.tenfourmusic.net
@@ -0,0 +1,22 @@
1
+
2
+ ticbuild run
3
+
4
+ usage: ticbuild run [options] [manifest]
5
+
6
+ Build a TIC-80 cart and launch it in TIC-80
7
+
8
+ Arguments:
9
+
10
+ [manifest] Path to manifest file (default: first *.ticbuild.jsonc)
11
+
12
+ Options:
13
+
14
+ -m, --mode <name> Build configuration name from manifest
15
+ -v, --var <key=value> Override manifest variable (can be used multiple times)
16
+ -h, --help Show this help message
17
+
18
+ Examples:
19
+
20
+ ticbuild run
21
+ ticbuild run game.ticbuild.jsonc
22
+ ticbuild run --mode debug
@@ -0,0 +1,8 @@
1
+
2
+ ticbuild tic80
3
+
4
+ usage: ticbuild tic80
5
+
6
+ Launch TIC-80 directly without building a cart
7
+
8
+ This is a convenience command to quickly open TIC-80.
@@ -0,0 +1,24 @@
1
+
2
+ ticbuild watch
3
+
4
+ usage: ticbuild watch [options] [manifest]
5
+
6
+ Build a TIC-80 cart, launch it, and watch for changes
7
+
8
+ When source files or the manifest change, the cart is automatically
9
+ rebuilt and TIC-80 is relaunched with the updated cart.
10
+
11
+ Arguments:
12
+
13
+ [manifest] Path to manifest file (default: first *.ticbuild.jsonc)
14
+
15
+ Options:
16
+
17
+ -m, --mode <name> Build configuration name from manifest
18
+ -v, --var <key=value> Override manifest variable (can be used multiple times)
19
+ -h, --help Show this help message
20
+
21
+ Examples:
22
+
23
+ ticbuild watch
24
+ ticbuild watch game.ticbuild.jsonc --mode debug
@@ -0,0 +1,43 @@
1
+ // paths are always relative to the manifest file's dir (which defines the project root dir)
2
+ {
3
+ "$schema": "./ticbuild.schema.json",
4
+ "project": {
5
+ "name": "{{PROJECT_NAME}}",
6
+ "includeDirs": [
7
+ "./src"
8
+ ],
9
+ "importDirs": [
10
+ "./assets"
11
+ ],
12
+ "binDir": "./dist/bin",
13
+ "objDir": "./dist/obj",
14
+ "outputCartName": "$(project.name).tic",
15
+ },
16
+ "variables": {},
17
+ "imports": [
18
+ {
19
+ "name": "maincode",
20
+ "path": "src/main.lua",
21
+ "kind": "LuaCode",
22
+ },
23
+ ],
24
+ "assembly": {
25
+ "lua": {
26
+ "minify": true,
27
+ "globals": {
28
+ "PROJECT_NAME": "$(project.name)",
29
+ },
30
+ },
31
+ "blocks": [
32
+ {
33
+ "chunks": [
34
+ "CODE"
35
+ ],
36
+ "asset": "maincode",
37
+ "code": {
38
+ "emitGlobals": true,
39
+ }
40
+ },
41
+ ],
42
+ },
43
+ }
Binary file
@@ -0,0 +1,327 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "title": "TIC-80 Build Manifest",
4
+ "description": "Configuration file for ticbuild projects",
5
+ "type": "object",
6
+ "required": [
7
+ "project",
8
+ "imports",
9
+ "assembly"
10
+ ],
11
+ "properties": {
12
+ "project": {
13
+ "type": "object",
14
+ "required": [
15
+ "name",
16
+ "binDir",
17
+ "objDir",
18
+ "outputCartName"
19
+ ],
20
+ "properties": {
21
+ "name": {
22
+ "type": "string",
23
+ "description": "Project name"
24
+ },
25
+ "includeDirs": {
26
+ "type": "array",
27
+ "items": {
28
+ "type": "string"
29
+ },
30
+ "description": "Directories to include in source file lookup"
31
+ },
32
+ "importDirs": {
33
+ "type": "array",
34
+ "items": {
35
+ "type": "string"
36
+ },
37
+ "description": "Directories to include in resource import lookup"
38
+ },
39
+ "binDir": {
40
+ "type": "string",
41
+ "description": "Output directory for built cartridges"
42
+ },
43
+ "objDir": {
44
+ "type": "string",
45
+ "description": "Output directory for build artifacts"
46
+ },
47
+ "outputCartName": {
48
+ "type": "string",
49
+ "description": "Name of the output cartridge file"
50
+ }
51
+ }
52
+ },
53
+ "variables": {
54
+ "type": "object",
55
+ "additionalProperties": {
56
+ "type": "string"
57
+ },
58
+ "description": "User-defined variables for substitution"
59
+ },
60
+ "imports": {
61
+ "type": "array",
62
+ "items": {
63
+ "type": "object",
64
+ "required": [
65
+ "name"
66
+ ],
67
+ "properties": {
68
+ "name": {
69
+ "type": "string",
70
+ "description": "Symbolic identifier for this import"
71
+ },
72
+ "path": {
73
+ "type": "string",
74
+ "description": "Path to the source file or cartridge"
75
+ },
76
+ "value": {
77
+ "type": "string",
78
+ "description": "Inline value for text or encoded binary imports"
79
+ },
80
+ "kind": {
81
+ "type": "string",
82
+ "enum": [
83
+ "LuaCode",
84
+ "Tic80Cartridge",
85
+ "binary",
86
+ "text"
87
+ ],
88
+ "description": "Type of import"
89
+ },
90
+ "sourceEncoding": {
91
+ "type": "string",
92
+ "enum": [
93
+ "raw",
94
+ "lz",
95
+ "hex",
96
+ "b85+1",
97
+ "lz85+1"
98
+ ],
99
+ "description": "Source encoding for binary imports"
100
+ },
101
+ "chunks": {
102
+ "type": "array",
103
+ "items": {
104
+ "type": "string",
105
+ "enum": [
106
+ "TILES",
107
+ "MAP",
108
+ "CODE",
109
+ "FLAGS",
110
+ "SFX",
111
+ "WAVEFORMS",
112
+ "PALETTE",
113
+ "MUSIC_TRACKS",
114
+ "MUSIC_PATTERNS",
115
+ "CODE_COMPRESSED",
116
+ "DEFAULT",
117
+ "SCREEN",
118
+ "CODE_WASM"
119
+ ]
120
+ },
121
+ "description": "Specific chunks to import from cartridges"
122
+ }
123
+ },
124
+ "anyOf": [
125
+ {
126
+ "required": [
127
+ "path"
128
+ ]
129
+ },
130
+ {
131
+ "required": [
132
+ "value"
133
+ ]
134
+ }
135
+ ]
136
+ },
137
+ "description": "Import definitions for external assets"
138
+ },
139
+ "assembly": {
140
+ "type": "object",
141
+ "required": [
142
+ "blocks"
143
+ ],
144
+ "properties": {
145
+ "lua": {
146
+ "type": "object",
147
+ "properties": {
148
+ "minify": {
149
+ "type": "boolean",
150
+ "description": "Whether to minify Lua code"
151
+ },
152
+ "minification": {
153
+ "type": "object",
154
+ "properties": {
155
+ "stripComments": {
156
+ "type": "boolean"
157
+ },
158
+ "maxIndentLevel": {
159
+ "type": "number"
160
+ },
161
+ "lineBehavior": {
162
+ "type": "string",
163
+ "enum": [
164
+ "pretty",
165
+ "tight",
166
+ "single-line-blocks"
167
+ ]
168
+ },
169
+ "maxLineLength": {
170
+ "type": "number"
171
+ },
172
+ "aliasRepeatedExpressions": {
173
+ "type": "boolean"
174
+ },
175
+ "renameLocalVariables": {
176
+ "type": "boolean"
177
+ },
178
+ "aliasLiterals": {
179
+ "type": "boolean"
180
+ },
181
+ "packLocalDeclarations": {
182
+ "type": "boolean"
183
+ },
184
+ "simplifyExpressions": {
185
+ "type": "boolean"
186
+ },
187
+ "removeUnusedLocals": {
188
+ "type": "boolean"
189
+ },
190
+ "removeUnusedFunctions": {
191
+ "type": "boolean"
192
+ },
193
+ "functionNamesToKeep": {
194
+ "type": "array",
195
+ "items": {
196
+ "type": "string"
197
+ }
198
+ },
199
+ "renameTableFields": {
200
+ "type": "boolean"
201
+ },
202
+ "tableEntryKeysToRename": {
203
+ "type": "array",
204
+ "items": {
205
+ "type": "string"
206
+ }
207
+ }
208
+ },
209
+ "description": "Minification options (OptimizationRuleOptions)"
210
+ },
211
+ "globals": {
212
+ "type": "object",
213
+ "additionalProperties": {
214
+ "oneOf": [
215
+ {
216
+ "type": "string"
217
+ },
218
+ {
219
+ "type": "number"
220
+ },
221
+ {
222
+ "type": "boolean"
223
+ }
224
+ ]
225
+ },
226
+ "description": "Global variables to emit as local declarations at the top of Lua code"
227
+ }
228
+ }
229
+ },
230
+ "blocks": {
231
+ "type": "array",
232
+ "items": {
233
+ "type": "object",
234
+ "required": [
235
+ "asset"
236
+ ],
237
+ "properties": {
238
+ "chunks": {
239
+ "type": "array",
240
+ "items": {
241
+ "type": "string",
242
+ "enum": [
243
+ "TILES",
244
+ "SPRITES",
245
+ "MAP",
246
+ "CODE",
247
+ "FLAGS",
248
+ "SFX",
249
+ "WAVEFORMS",
250
+ "PALETTE",
251
+ "MUSIC_TRACKS",
252
+ "MUSIC_PATTERNS",
253
+ "CODE_COMPRESSED",
254
+ "DEFAULT",
255
+ "SCREEN",
256
+ "CODE_WASM"
257
+ ]
258
+ }
259
+ },
260
+ "bank": {
261
+ "type": "integer",
262
+ "minimum": 0,
263
+ "maximum": 7,
264
+ "description": "Bank index (defaults to 0)"
265
+ },
266
+ "asset": {
267
+ "oneOf": [
268
+ {
269
+ "type": "string"
270
+ },
271
+ {
272
+ "type": "object",
273
+ "required": [
274
+ "import"
275
+ ],
276
+ "properties": {
277
+ "import": {
278
+ "type": "string"
279
+ },
280
+ "chunks": {
281
+ "type": "array",
282
+ "items": {
283
+ "type": "string"
284
+ }
285
+ }
286
+ }
287
+ }
288
+ ]
289
+ },
290
+ "code": {
291
+ "type": "object",
292
+ "properties": {
293
+ "emitGlobals": {
294
+ "type": "boolean",
295
+ "description": "Whether to emit assembly.lua.globals for this code block"
296
+ }
297
+ }
298
+ }
299
+ }
300
+ }
301
+ }
302
+ },
303
+ "description": "Assembly configuration"
304
+ },
305
+ "buildConfigurations": {
306
+ "type": "object",
307
+ "additionalProperties": {
308
+ "type": "object",
309
+ "properties": {
310
+ "project": {
311
+ "type": "object"
312
+ },
313
+ "variables": {
314
+ "type": "object",
315
+ "additionalProperties": {
316
+ "type": "string"
317
+ }
318
+ },
319
+ "assembly": {
320
+ "type": "object"
321
+ }
322
+ }
323
+ },
324
+ "description": "Build configuration overrides"
325
+ }
326
+ }
327
+ }