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
.
No 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
name
field. - Run
pnpm install
in 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.ts
to .gitignore - they don't need to be checked in. - Add
.tbaf
to .gitattributes as shown, that will allow for proper highlighting on GitHub. - Add
**/_tmp.tbaf.ts
to VScodefiles:exclude
list. (CTRL-,
-files:exclude
. Or, see example). This is just a temp file used in transpilation. - Create your first tbaf!