Introducing the new Private NPM Registry for SpiroKit

Introducing the new Private NPM Registry for SpiroKit

Since the first version of SpiroKit, you had to download a .tgz package from Gumroad and install it manually in your projects.

This process caused several issues, such as having to download the file again with every new version, including the file in Git to build with Expo Application Services (EAS), and overall discomfort.

New private NPM registry

But we have great news for you! We have been working on a new private NPM registry for SpiroKit to simplify the installation process. Now, users can sign up for the registry using their SpiroKit License Key (available on Gumroad) and install the package by running the command:

yarn add @spirokit/core

This new feature will eliminate the need to download and install the package with every new version. Plus, it will allow for more streamlined integration with EAS, as the package can now be installed via the registry without including it in Git.

Additionally, we have updated all our templates to include a .npmrc file that specifies the address of the private registry to download the SpiroKit package.

We have also updated our installation documentation with a step-by-step explanation of how to create an account on the private registry, create a base64-encoded string for authorization during the build/deploy, and setup environment variable on your system for local development.

For those who are already working on a project with SpiroKit, you will need to add the .npmrc file to the root of your project. The contents of the file are as follows:

# Set registry for packages starting with @spirokit
@spirokit:registry=https://registry.spirokit.com/

# Set default registry for all other packages
registry=https://registry.npmjs.org/

always-auth=true
_auth=${SPIROKIT_AUTH_TOKEN}

Automatic authorization for EAS build/Vercel

To simplify the authorization process during CI/CD, you can use your username and password to generate a base64-encoded token that can be included in the .npmrc file. This will allow you to automate the authorization process when installing SpiroKit. Simply run the following command in your terminal:

echo -n 'username:password' | base64

Replace "username" and "password" with your credentials, and copy the resulting string. Then, add the following line to your .npmrc file:

always-auth=true
_auth=${SPIROKIT_AUTH_TOKEN}

Finally, add the SPIROKIT_AUTH_TOKEN environment variable with the base64 string on your EAS Build/Vercel project, and you are good to go.

We are thrilled to bring this new feature to you and hope it will make the SpiroKit experience even better. Stay tuned for more updates!