Compiling Clockwork
Install Node.js and Yarn
- Node.js 23 is used to compile Clockwork, you may be able to use older versions but it’s not recommended.
- Yarn 4.6 is required to install dependencies and compile Clockwork.
Clone the repository
git clone https://github.com/Turtlepaw/clockwork.git && cd clockworkInstall dependencies
yarn installCompile Clockwork
yarn buildYou’re done! 🎉
Clockwork is now compiled and ready to use. There will be 3 executables generated in the project root:
clockwork-winclockwork-macosclockwork-linux
What happens when you run yarn build?
- Compiles all the Typescript files in
./scriptsto Javascript files in./build/scripts - Bundles all the compiled javascript files and dependencies into
index.js - Injects the current version found in
./package.jsoninto./build/index.js - Packages Node.js and
./build/index.jsinto an executable for Linux, Mac OS, and Windows
This makes it work on devices even without Node.js installed!
Testing the auto updater
If you need to test the auto updater, temporarily set the version in package.json to something lower and recompile the executables, the version set in package.json will automatically be injected into the compiled javascript.