Compiling Clockwork
Install Node.js and Yarn
Node.js 20 or higher, and Yarn 4.6 is required to compile Clockwork.
Clone the repository
git clone https://github.com/Turtlepaw/clockwork.git && cd clockwork
Install dependencies
yarn install
Compile Clockwork
yarn build
You’re done! 🎉
Clockwork is now compiled and ready to use. There will be 3 executables generated in the project root:
clockwork-win
clockwork-macos
clockwork-linux
What happens when you run yarn build
?
- Compiles all the Typescript files in
./scripts
to Javascript files in./build/scripts
- Bundles all the compiled javascript files and dependencies into
index.js
- Injects the current version found in
./package.json
into./build/index.js
- Packages Node.js and
./build/index.js
into 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.