A counter strike 2 quick typescript project setup with bundler that automatically bundles all .ts typescript files.
Note
Now valve have officaily supported their JS interface, this project has been stripped back to a glorified typescript+rollup setup. But if you want all the needed tooling with two single line commands, then here it is!
Run npx create-s2ts@latest at the root of your map folder. The folder should be something like /Steam/steamapps/common/Counter-Strike Global Offensive/content/csgo_addons/<map-name>. This will setup a node project and create an example script.
npx create-s2ts@latestRun the install.
npm installOnce installed you can run with the start command:
npm run start-
While running, s2ts will look for any file updates to
.tsfiles in your/scripts/vscriptsfolder and bundle them into a js file with no external dependencies so they can run in counter strike. -
While the workshop tools are running, the bundled
.jsfiles in the build folder will be compiled and accessable in yourpoint_scriptentity. -
Documentation for Valves scripting API