S2ts
A bundler for Counter Strike 2 that compiles TypeScript projects into .vts_c files for map and game mode creators.
Install / Use
/learn @Peterclark1996/S2tsREADME
Source 2 TypeScript
A counter strike 2 quick typescript project setup with bundler that automatically bundles all .ts typescript files.
[!IMPORTANT]
Now valve have officaily supported their JS interface, this project has been stripped back to a glorified typescript + rollup setup. This project is no longer needed, I would recommend setting up typescript and some bundler yourself, or using this boilerplate project https://github.com/Source2ZE/cs_script_boilerplate
Installation
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@latest
Run the install.
npm install
Usage
Once 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
Related Skills
node-connect
353.3kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
111.7kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
Writing Hookify Rules
111.7kThis skill should be used when the user asks to "create a hookify rule", "write a hook rule", "configure hookify", "add a hookify rule", or needs guidance on hookify rule syntax and patterns.
review-duplication
100.7kUse this skill during code reviews to proactively investigate the codebase for duplicated functionality, reinvented wheels, or failure to reuse existing project best practices and shared utilities.
