π Getting Started
Getting Startedβ
This section covers how to run the application for the first time - from installation to first run.
Requirementsβ
Before you start installing anything, make sure you have the below installed
- Git
- Used to download the code and make contributions.
- Node.js version 20.0 or higher
- When installing Node.js, you are recommended to check all checkboxes related to dependencies.
- Emscripten version 4.0.10 or higher
- This is used to compile the C++ to WebAssembly.
- CMake
- The build system for C++.
- Python version 3.8 or higher
- Emscripten requires this for its tooling and scripts.
These all need to be set in your PATH variable and must be accessible in your terminal for Img2Num to run properly.
How to check for and set PATH variables
- Windows
- macOS
- Linux
Check if a tool is in your pathβ
Open Command Prompt or Powershell by pressing the windows button + cmd/powershell, then run:
git --version
node --version
python --version
cmake --version
emcc -v
If the command prints a version, itβs already in PATH. If it says βcommand not foundβ or similar, you need to add it.
Not in your path?β
For Windows, this link will explain how to add variables to your PATH.
Check if a tool is in your pathβ
Open Terminal, then run:
git --version
node --version
python --version
cmake --version
emcc -v
If the command prints a version, itβs already in PATH. If it says βcommand not foundβ or similar, you need to add it.
Not in your path?β
For macOS, this link will explain how to add variables to your PATH.
Check if a tool is in your pathβ
Open Terminal, then run:
git --version
node --version
python --version
cmake --version
emcc -v
If the command prints a version, itβs already in PATH. If it says βcommand not foundβ or similar, you need to add it.
Not in your path?β
For Linux, this link will explain how to add variables to your PATH.
Cloning the repositoryβ
This step will guide you through downloading (cloning) the repository's code into a folder, named Img2Num.
# Clone the repository into a folder named `Img2Num`
git clone https://github.com/Ryan-Millard/Img2Num.git
Installing dependenciesβ
This section will help you install all the required dependencies.
You can choose to only install the dependencies for one portion of the app, but it is recommended that you install the dependencies for both if you want all the functionality.
- Both
- Main App Only
- Docs Site Only
# Install main app's dependencies
cd Img2Num
npm install
# Install documentation site's dependencies
npm install --prefix ./docs
cd Img2Num
npm install
npm install --prefix ./docs
Running the app for the first timeβ
This section will help you run both the main application and the documentation site for the first time.
- Running Both Simultaneously
- Running Main App Only
- Running Docs Site Only
From the project's root, run:
npm run dev:all
From the project's root, run:
npm run dev
From the docs/ folder, run:
npm run start
From the project's root, run:
npm run docs start