Skip to content

Instantly share code, notes, and snippets.

@johnlindquist
Created September 8, 2022 23:27
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save johnlindquist/ef5bdefd4afb2e4570c70ee354a94ee4 to your computer and use it in GitHub Desktop.
Save johnlindquist/ef5bdefd4afb2e4570c70ee354a94ee4 to your computer and use it in GitHub Desktop.
Script Kit Dev Setup

Script Kit Dev Setup

Note: This ain't pretty 😅

Requirements: yarn 1

Why both npm and yarn?

The App was created with https://github.com/electron-react-boilerplate/electron-react-boilerplate a long time ago. They require yarn and webpack.

I regret this decision, but have been unable to prioritize the time to switch over to another build system, especially with so many moving pieces.

Thus, we use yarn to build the App and npm to build the SDK 🤦‍♂️

Using node 16.4.2 from ~/.knode

Installing Kit.app already installed node 16.4.2 to ~/.knode. You'll want to use this node version for all build/run steps:

PATH=~/.knode/bin:$PATH

This will use 16.4.2's node/npm when working with Kit. (Alternatively, you can use nvm/n/whatever, but I don't)

Clone Kit SDK

Clone: git clone https://github.com/johnlindquist/kit.git

Install: npm install

Clone Kit App

Clone: git clone https://github.com/johnlindquist/kitapp.git

Install: yarn

Building Kit SDK

npm run build-kit

The build command builds the SDK to ~/.kit

yarn link (First run only)

  1. cd to ~/.kit
  2. yarn link
  3. cd to ~/wherever you cloned kitapp
  4. yarn link @johnlindquist/kit

This will force the App to use the SDK so you can work on both simultaneously

Building the App

yarn start

Assuming everything went well, the app should start up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment