A set of TypeScript libraries to work with the Source Engine.
This code used to be part of the Source Engine Support extension for Visual Studio Code.
This repository containy several packages.
Name | Description | Install |
---|---|---|
kv | Keyvalue file parsing and tokenizer for reading, writing and inspecting keyvalue files | npm install @sourcelib/kv |
fs | Source Engine virtual filesystem tools to read and write to a game's files | npm install @sourcelib/fs |
vmt | Material file (.vmt) tools | npm install @sourcelib/vmt |
captions | Caption file parsing tools | npm install @sourcelib/captions |
sourcelib is built using npm workspaces to manage multiple npm packages at once.
Install
git clone https://github.com/source-lib/sourcelib.git
cd sourcelib
npm install --workspaces
Compile everything
npm run compile --workspaces
Test everything
npm run test --workspaces
npm run benchmark --workspaces
Lint everything
npm run lint --workspaces
Individual packages are located in the packages
directory. They can be developed independently just like normal. For example:
cd packages/kv
npm run test
If you wish to contribute, please fork the repository and create a pull request!
This project is licensed under the MIT License: License
No code owned by Valve Software has been copied or used as reference. All this code has been written from scratch.