-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
installation scripts added + README installation information updated
- Loading branch information
Showing
5 changed files
with
131 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,21 @@ | ||
## Requirements | ||
- Python 3.11.1+ | ||
- Node v20.11.0 | ||
- Node v20.11.0+ | ||
|
||
## Installation | ||
Both steps must be completed: | ||
1) To Install Python Requirements: | ||
``` | ||
pip install -r requirements.txt | ||
pip install -r dev-requirements.txt | ||
``` | ||
1) To install requirements: | ||
``` | ||
# For mac | ||
chmod +x ./scripts/install.sh | ||
./scripts/install.sh | ||
2) To Install Node Requirements: | ||
``` | ||
cd site | ||
npm install | ||
``` | ||
3) Contact me ([email protected]) for the .env file especially if your going to be on the website for testing of features (.env file is important for the site during development mode) | ||
4) Once .env file is recieved: | ||
# For windows | ||
./scripts/install.bat | ||
``` | ||
2) Contact me ([email protected]) for the .env file especially if your going to be on the website for testing of features (.env file is important for the site during development mode) | ||
3) Once .env file is recieved: | ||
1) place it in the **site** folder | ||
5) To run website in development mode (meaning outside of the production url): | ||
4) To run website in development mode (meaning outside of the production url): | ||
1) On the terminal change directory to the **site** folder: | ||
``` | ||
cd site | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
dotenv # Development env file parser | ||
python-dotenv # Development env file parser |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
@echo off | ||
|
||
echo "[SYSTEM] Running install.sh" | ||
echo "[SYSTEM] Installing python dependencies..." | ||
IF ! "command" "-v" "pip" ( | ||
echo "-e" "[31m][ERROR] pip is not installed. Please install pip before running this script.[0m" | ||
exit "1" | ||
) | ||
pip "install" "-r" "requirements.txt" | ||
pip "install" "-r" "dev-requirements.txt" | ||
echo "-e" "[32m[SYSTEM] Python dependencies installed[0m" | ||
echo "[SYSTEM] Installing node dependencies..." | ||
cd "site" | ||
IF ! "command" "-v" "npm" ( | ||
echo "-e" "[31m[ERROR] npm is not installed. Please install npm before running this script.[0m" | ||
exit "1" | ||
) | ||
IF ! "command" "-v" "node" ( | ||
echo "-e" "[31m[ERROR] node is not installed. Please install node before running this script.[0m" | ||
exit "1" | ||
) | ||
IF "-d" "%CD%\static\node_modules" ( | ||
echo "[SYSTEM] Node modules directory installed. Manually checking for required modules... ." | ||
echo "[SYSTEM] Checking for tailwindcss..." | ||
IF "-d" "%CD%\static\node_modules\tailwindcss" ( | ||
echo "-e" "[32m[SYSTEM] Tailwindcss is installed[0m" | ||
) ELSE ( | ||
echo "-e" "[31m[SYSTEM] Tailwindcss is not installed. Installing tailwindcss...[0m" | ||
npm "install" "tailwindcss" "--prefix" "%CD%\static" | ||
echo "-e" "[32m[SYSTEM] Tailwindcss installed[0m" | ||
) | ||
echo "[SYSTEM] Checking for flowbite..." | ||
IF "-d" "%CD%\static\node_modules\flowbite" ( | ||
echo "-e" "[32m[SYSTEM] Flowbite is installed[0m" | ||
) ELSE ( | ||
echo "-e" "[31m[SYSTEM] Flowbite is not installed. Installing flowbite...[0m" | ||
npm "install" "flowbite" "--prefix" "%CD%\static" | ||
echo "-e" "[32m[SYSTEM] Flowbite installed[0m" | ||
) | ||
echo "-e" "[32m[SYSTEM] Node dependencies installed, installation complete [0m" | ||
exit "0" | ||
) ELSE ( | ||
npm "install" | ||
echo "-e" "[32m[SYSTEM] Node dependencies installed[0m" | ||
) | ||
echo "[SYSTEM] Moving node_modules to static folder" | ||
echo "[SYSTEM] Running on a non-Windows system" | ||
mv "%CD%\node_modules" "%CD%\static" | ||
echo "-e" "[32m[SYSTEM] Installation complete[0m" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,74 @@ | ||
#!/bin/bash | ||
echo "[SYSTEM] Running install.sh" | ||
|
||
if [[ "$OSTYPE" == "msys" || "$OSTYPE" == "cygwin" || "$OSTYPE" == "win32" ]]; then | ||
echo "[SYSTEM] Running on Windows" | ||
move ./node_modules ./static | ||
# Install the dependencies | ||
echo "[SYSTEM] Installing python dependencies..." | ||
|
||
|
||
# check if pip is installed | ||
if ! command -v pip &> /dev/null; then | ||
echo -e "\033[31m][ERROR] pip is not installed. Please install pip before running this script.\033[0m" | ||
exit 1 | ||
fi | ||
|
||
pip install -r requirements.txt | ||
pip install -r dev-requirements.txt | ||
|
||
|
||
echo -e "\033[32m[SYSTEM] Python dependencies installed\033[0m" | ||
|
||
echo "[SYSTEM] Installing node dependencies..." | ||
|
||
cd site | ||
|
||
# Check if npm is installed | ||
if ! command -v npm &> /dev/null; then | ||
echo -e "\033[31m[ERROR] npm is not installed. Please install npm before running this script.\033[0m" | ||
exit 1 | ||
fi | ||
|
||
# Check if node is installed | ||
if ! command -v node &> /dev/null; then | ||
echo -e "\033[31m[ERROR] node is not installed. Please install node before running this script.\033[0m" | ||
exit 1 | ||
fi | ||
|
||
# check for node_modules folder in static | ||
if [ -d "./static/node_modules" ]; then | ||
echo "[SYSTEM] Node modules directory installed. Manually checking for required modules... ." | ||
|
||
echo "[SYSTEM] Checking for tailwindcss..." | ||
|
||
if [ -d "./static/node_modules/tailwindcss" ]; then | ||
echo -e "\033[32m[SYSTEM] Tailwindcss is installed\033[0m" | ||
else | ||
echo -e "\033[31m[SYSTEM] Tailwindcss is not installed. Installing tailwindcss...\033[0m" | ||
npm install tailwindcss --prefix ./static | ||
echo -e "\033[32m[SYSTEM] Tailwindcss installed\033[0m" | ||
fi | ||
|
||
echo "[SYSTEM] Checking for flowbite..." | ||
|
||
if [ -d "./static/node_modules/flowbite" ]; then | ||
echo -e "\033[32m[SYSTEM] Flowbite is installed\033[0m" | ||
else | ||
echo -e "\033[31m[SYSTEM] Flowbite is not installed. Installing flowbite...\033[0m" | ||
npm install flowbite --prefix ./static | ||
echo -e "\033[32m[SYSTEM] Flowbite installed\033[0m" | ||
fi | ||
|
||
echo -e "\033[32m[SYSTEM] Node dependencies installed, installation complete \033[0m" | ||
exit 0 | ||
else | ||
echo "[SYSTEM] Running on a non-Windows system" | ||
mv ./node_modules ./static | ||
npm install | ||
|
||
echo -e "\033[32m[SYSTEM] Node dependencies installed\033[0m" | ||
fi | ||
|
||
# move node_modules to static folder | ||
echo "[SYSTEM] Moving node_modules to static folder" | ||
|
||
echo "[SYSTEM] Running on a non-Windows system" | ||
mv ./node_modules ./static | ||
|
||
echo -e "\033[32m[SYSTEM] Installation complete\033[0m" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters