An example/template IE mod project setup for TBAF usage in BGforge MLS
If you want to just try TBAF:
- Install Node.js.
- Install pnpm.
- Clone and install dependencies:
git clone https://github.com/BGforgeNet/tbaf-example.git cd tbaf-example pnpm i - Open script.tbaf in VScode.
- Use
CTLR-R, or "BGforge MLS: compile" command from command menu. - Check out the resulting
script.baf.
Not all these steps arent's strictly necessary for using TBAF, but you'll save yourself some headache by following them.
- Install Node.js.
- Install pnpm.
- Copy over package.json. Edit
namefield. - Run
pnpm installin mod directory. This installs npm packages specified inpackage.json. - Install VScode ESlint extension, copy over eslint.config.mjs. That helps VScode to point out some errors in TS code.
- Add
node_modules/,**/_tmp.tbaf.tsto .gitignore - they don't need to be checked in. - Add
.tbafto .gitattributes as shown, that will allow for proper highlighting on GitHub. - Add
**/_tmp.tbaf.tsto VScodefiles:excludelist. (CTRL-,-files:exclude. Or, see example). This is just a temp file used in transpilation. - Create your first tbaf!