/sourcelib

Collection of typescript libraries to interact with Source Engine files

Primary LanguageTypeScriptMIT LicenseMIT

Sourcelib

CI Test MAINTAINED contributions welcome

ESLINT TYPESCRIPT NODE.JS JEST

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.

Packages

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

Projects using sourcelib

Development

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

Contributing

If you wish to contribute, please fork the repository and create a pull request!

License

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.