{"id":17473748,"url":"https://github.com/bjorntheprogrammer/aoe4mod-typescript","last_synced_at":"2025-06-12T10:08:52.063Z","repository":{"id":208623836,"uuid":"722079754","full_name":"BjornTheProgrammer/Aoe4Mod-Typescript","owner":"BjornTheProgrammer","description":"A tool for making aoe4 mods with TypeScript","archived":false,"fork":false,"pushed_at":"2023-11-24T10:45:40.000Z","size":32,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-30T22:51:55.656Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BjornTheProgrammer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-11-22T11:48:26.000Z","updated_at":"2024-08-05T17:47:27.000Z","dependencies_parsed_at":"2024-12-07T18:51:50.154Z","dependency_job_id":null,"html_url":"https://github.com/BjornTheProgrammer/Aoe4Mod-Typescript","commit_stats":{"total_commits":11,"total_committers":1,"mean_commits":11.0,"dds":0.0,"last_synced_commit":"8e009d8d4f003d06a4e6582df7554ec0d6d22e09"},"previous_names":["bjorntheprogrammer/aoe4mod-typescript"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/BjornTheProgrammer/Aoe4Mod-Typescript","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BjornTheProgrammer%2FAoe4Mod-Typescript","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BjornTheProgrammer%2FAoe4Mod-Typescript/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BjornTheProgrammer%2FAoe4Mod-Typescript/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BjornTheProgrammer%2FAoe4Mod-Typescript/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BjornTheProgrammer","download_url":"https://codeload.github.com/BjornTheProgrammer/Aoe4Mod-Typescript/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BjornTheProgrammer%2FAoe4Mod-Typescript/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259444945,"owners_count":22858547,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-18T18:06:55.159Z","updated_at":"2025-06-12T10:08:52.039Z","avatar_url":"https://github.com/BjornTheProgrammer.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Aoe4Mod-Typescript\nA tool for making aoe4 mods with TypeScript.\n\n## Usage\n\n```bash\nnpx aoe4mod\n```\n\n```\nUSAGE aoe4mod init|prepare|build|dev\n\nCOMMANDS:\n    init \u003cname\u003e  initialize aoe4mod with \u003cname\u003e\n    prepare      prepare aoe4mod\n    build        build aoe4mod\n    dev          run aoe4mod in dev mode\n```\n\n## Start Project\n\nStarts a project using a basic template.\n\n```bash\nnpx aoe4mod init \u003cname\u003e\n```\n\n### Project Structure\n\nThe basic template will include the following files.\n\n```\n\u003cname\u003e\n├── .aoe4\n├── src/\n│   └── main.ts\n├── aoe4.config.ts\n└── tsconfig.json\n```\n\n- `.aoe4` is where the types will automatically be generated to, along with some other internal files.\n- `src/` is where all of your files should go. \n- `aoe4.config.ts` will contain the `defineAoe4Config` function. You should update this with your specific project details\n- `tsconfig.json` is the main tsconfig file for your program. Do not modify unless you know what you are doing.\n\n### Customization\n\nYou can customize the build process by using `defineAoe4Config`. Start by specifying the mod(s) you wish to register. Add the entrypoint of your program, additionally specify where you want the exitpoint for that file to be. It is recommended to put this in your Aoe4 Mod `assest` folder. Additionally you can extend functionality of the build process by accessing the input and output files before they are written to add your own changes.\n\n```ts\nexport default defineAoe4Config({\n\t// Register mod, allows for auto import and typing of MyMod_OnInit, MyMod_Start, etc\n\tregisterMods: [ 'MyMod' ],\n\tmappings: [\n\t\t// entrypoint     exitpoint\n\t\t['./src/main.ts', './mod/main.scar']\n\t],\n\tbuild: {\n\t\ttransform: {\n\t\t\t// modify the input files which go into typescript-to-lua\n\t\t\tinput: (filePath, fileText) =\u003e {\n\t\t\t\treturn fileText;\n\t\t\t},\n\t\t\t// modify the output files which are saved to path;\n\t\t\toutput: (filePath, fileText) =\u003e {\n\t\t\t\treturn [filePath, fileText]\n\t\t\t},\n\t\t}\n\t}\n})\n```\n\n### Dev Mode\n\nYou can run your project in dev mode, which will automatically compile and output your updated scar files by using the command:\n```bash\nnpm run dev\n```\n\n## Acknowledgements\n\nLarge amounts of inspiration came from [Age of Empires 4 TypeScript template](https://github.com/aoemods/aoe4-typescript-template) by [RobinKa](https://github.com/RobinKa).\n\n## License\n\nThis project is licensed under MIT.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbjorntheprogrammer%2Faoe4mod-typescript","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbjorntheprogrammer%2Faoe4mod-typescript","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbjorntheprogrammer%2Faoe4mod-typescript/lists"}