-
Notifications
You must be signed in to change notification settings - Fork 0
Local development with Kajabi Products
👉 NOTE: this documentation is out of date. Please see the revised walkthrough in the Readme
This is a non-destructive way to use your currently checked out local Sage branch within your local Kajabi-Products app. It avoids updating Kajabi-Products' gemfile directly which can create extra commits and noisy merge conflicts within gemfile.lock.
The function sets a global Bundler config that will use your local Sage gem in place of the Kajabi-Products Gemfile location definition.
Remove the configuration to revert back to the current Sage release.
Depending on your shell (zsh/bash), add this function to your ~/.zshrc or ~/.bashrc:
kajabi-sage-local-gem()
{
if [ -z "$1" ]; then
echo "ERROR: Requires the relative path of Sage gem or false to remove."
else
if [ "$1" = "false" ]; then
echo "\nREMOVING: Bundle config Sage local gem definition"
echo "-------------------------------------------------"
bundle config --delete disable_local_branch_check
bundle config --delete local.Sage
else
echo "\nSETTING: Bundle config to the Sage gem local location to $1 and using the currently checked out Sage branch."
echo "-------------------------------------------------"
bundle config --local disable_local_branch_check true
bundle config --local local.Sage $1
fi;
bundle install
echo "\n\nBundle Config"
echo "-------------------------------------------------"
bundle config
fi
}To set the local location, pass the relative path as an argument.
$ kajabi-sage-local-gem RELATIVE_PATH_TO_LOCAL_SAGE_GEM # ../sageKajabi-Products will now use the currently checked out branch of your local Sage gem. 🥳
You can confirm your preferences are active by running bundle config.
$ bundle config
# Settings are listed in order of priority. The top value will be used.
# github.com
# Set for the current user (/Users/~/~/.bundle/config): "XXX:x-oauth-basic"
# disable_local_branch_check
# Set for the current user (/Users/~/~/.bundle/config): true
# local.sage
# Set for the current user (/Users/~/~/.bundle/config): "/Users/~/~/sage"
# gems.contribsys.com
# Set for your local app (/Users/~/~/kajabi-products/.bundle/config): "XXX"
# bootboot_env_prefix
# Set for your local app (/Users/~/~/kajabi-products/.bundle/config): "KAJABI_DEPENDENCIES"
Run Kajabi-Products how you normally would.
To unset the configuration:
$ kajabi-sage-local-gem falseGetting Started
- Welcome
- Introduction
- Setup
- Installation
- Contributing
- Git/code workflow
- Local development In Kajabi-Products
- Updating Sage version and integrating into Kajabi
Guidelines
- Voice & Tone
- Product language
- Code Conventions
- JS & Test Binding Conventions
- Understanding and Maintaining Type Specs
- Updating Icons
- Using z-index
- Accessibility
- Browser support
- Color Spaces/Profiles
- Sharing In-progress Work
- Deprecation
Updates