Created by Chandler 'Deafwave' Ferry to ease the programming strain of making Botmaker scripts.
There are several outlined improvements in Github Issues.
Take one on, submit a Pull Request!
- Create a Private Fork OR
git clone https://github.com/deafwave/osrs-botmaker-typescript cd osrs-botmaker-typescriptpnpm i- Install VSCode Extensions (ESLint, TypeScript, Prettier, Prettier-ESLint)
pnpm watchorpnpm build- View output in
dist/<FOLDER_NAME>.js - Copy that output to BotMaker, Save & Run
- Create a folder in
srcfor your script - Create an
index.tsinside of there as the Entrypoint - Execute
pnpm watchorpnpm buildto have it output to thedistfolder
I'm still learning about this one as it's new to TypeScript >5.0.
For now, do not set composite: true, and ignore the error.
With proper extensions, this repository will twist your programming style to its opinions to make this easy.
Install the suggested VSCode extensions and listen to what VSCode tells you.
Start by creating .ts files and writing the same exact JavaScript code you are familiar with.
ESLint and TypeScript will tell you when you're doing something improper. Follow the guidance, you will write better code over time.
Execute Program is the most valuable interactive course I've found (16 free lessons).
TypeScript Handbook is a valuable 'raw' resource.
Create .ts files and place your .js code in them and leverage ESLint disable rules to make your life a little easier.
Resolve the errors & add typings over time.
- Open your repositories Github Actions
- Click on the latest workflow run
- If the workflow run failed, diagnose why and fix it!
- Once you have a successful workflow run, click
botmaker-scriptsin the Arifacts section
No! .d.ts files are meant for external dependencies that do not have typings such as Runelite & Sox.
All .ts files automatically generate declaration files.
- Rollup executes
tscto compile.tsto.jsusing ESNext module resolution - Rollup passes the compiled code through all custom & external plugins based on the
rollup.config.js - Rollup passes the compiled code into Babel with a target of
rhino: '1.7.14'to compile the final bundle to our required ES5 target
Resources: