Special Installations
Node global version
To set the default Node version to be used by nvm:
- Run the following command in your terminal, replacing
<version>with the Node version number you want to set as the default:nvm alias default <version>. For example, to useNode 20:
nvm alias default 20
- Create a
.nvmrcfile in your project root directory with the Node version in its content, so the new version will be set when you runnvm useor when a Terminal is opened in your favorite code editor (e.g. Visual Studio Code or Cursor.sh). For example:
File: .nvmrc
20
- Create a
.nvmrcfile in your user's home directory with the Node version and add the commands on the shell starter script, so the new version will be set when a new Terminal window is opened. For example:
MacOS:
File: /Users/$USER/.zshrc or /Users/$USER/.bashrc
Linux:
File: /home/$USER/.bashrc or /home/$USER/.profile
Add this lines:
# To set the Node version when new Terminal window is opened
if [ -f "./.nvmrc" ]; then
nvm use
fi
And create the .nvmrc file mentioned earlier in the user's home directory: /Users/$USER or /home/$USER.
Backend
Install from Git repositories
To install any of the the backend solutions (Core, AI, etc) from a specific branch in the Git repositories, e.g. "branch_x":
Pip
pip install git+https://github.com/tomkat-cr/genericsuite-be@branch_x
pip install git+https://github.com/tomkat-cr/genericsuite-be-ai@branch_x
Pipenv
pipenv install git+https://github.com/tomkat-cr/genericsuite-be@branch_x
pipenv install git+https://github.com/tomkat-cr/genericsuite-be-ai@branch_x
Poetry
poetry add git+https://github.com/tomkat-cr/genericsuite-be@branch_x
poetry add git+https://github.com/tomkat-cr/genericsuite-be-ai@branch_x
To install the backend scripts from a specific branch in the Git repositories, e.g. "branch_x":
npm install tomkat-cr/genericsuite-be-scripts#branch_x
Install from local directory
To install any of the the backend solutions (Core, AI, etc) from a local directory:
Pip
pip install ../genericsuite-be
pip install ../genericsuite-be-ai
Pipenv
pipenv install ../genericsuite-be
pipenv install ../genericsuite-be-ai
Poetry
poetry add ../genericsuite-be
poetry add ../genericsuite-be-ai
To install the backend scripts from a local directory:
npm install ../genericsuite-be-scripts
Frontend
Install from Git repositories
From the main branch:
npm install tomkat-cr/genericsuite-fe
npm install tomkat-cr/genericsuite-fe-ai
From a specific branch:
npm uninstall generisuite
npm install tomkat-cr/genericsuite-fe#branch_name
npm uninstall generisuite-ai
npm install tomkat-cr/genericsuite-fe-ai#branch_name
E.g.
npm uninstall genericsuite && npm install tomkat-cr/genericsuite-fe#develop
npm uninstall genericsuite-ai && npm install tomkat-cr/genericsuite-fe-ai#develop
IMPORTANT:
- When you've made changes to any of the GenericSuite frontend packages code, perform a
make pre-publishto rebuild thedistdirectory files before the Gitcommitandpush, because those files are required fornpm installto work. Then re-install the changed package in the parent project (your app) using thenpm install tomkat-cr/genericsuite-feornpm install tomkat-cr/genericsuite-fe-aicommand.