npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

aoe4mod

v1.0.5

Published

A tool for making aoe4 mods with TypeScript

Downloads

11

Readme

Aoe4Mod-Typescript

A tool for making aoe4 mods with TypeScript.

Usage

npx aoe4mod
USAGE aoe4mod init|prepare|build|dev

COMMANDS:
    init <name>  initialize aoe4mod with <name>
    prepare      prepare aoe4mod
    build        build aoe4mod
    dev          run aoe4mod in dev mode

Start Project

Starts a project using a basic template.

npx aoe4mod init <name>

Project Structure

The basic template will include the following files.

<name>
├── .aoe4
├── src/
│   └── main.ts
├── aoe4.config.ts
└── tsconfig.json
  • .aoe4 is where the types will automatically be generated to, along with some other internal files.
  • src/ is where all of your files should go.
  • aoe4.config.ts will contain the defineAoe4Config function. You should update this with your specific project details
  • tsconfig.json is the main tsconfig file for your program. Do not modify unless you know what you are doing.

Customization

You 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.

export default defineAoe4Config({
	// Register mod, allows for auto import and typing of MyMod_OnInit, MyMod_Start, etc
	registerMods: [ 'MyMod' ],
	mappings: [
		// entrypoint     exitpoint
		['./src/main.ts', './mod/main.scar']
	],
	build: {
		transform: {
			// modify the input files which go into typescript-to-lua
			input: (filePath, fileText) => {
				return fileText;
			},
			// modify the output files which are saved to path;
			output: (filePath, fileText) => {
				return [filePath, fileText]
			},
		}
	}
})

Dev Mode

You can run your project in dev mode, which will automatically compile and output your updated scar files by using the command:

npm run dev

License

This project is licensed under MIT.