Hi there! 👋 We're thrilled that you'd like to contribute to AIA.
AIA is purely frontend code written in React.
The most important directories:
/src/algorithms
- Where the algorithms are implemented/src/components
- Where the React components are implemented/src/pseudocode
- How the pseudocodes are parsed
Node.js version 18.17.1 or newer is required for development purposes.
Python version 3.9.6 or newer is required for development purposes.
IMPORTANT: All the steps below have to get executed at least once to get the development setup up and running!
Now that everything AIA requires to run is installed, the actual AIA code can be checked out and set up:
-
Fork the AIA repository.
-
Clone your forked repository:
git clone https://github.com/<your_github_username>/algorithms-in-action.github.io.git
-
Go into repository folder:
cd algorithms-in-action.github.io
-
Add the original AIA repository as
upstream
to your forked repository:git remote add upstream https://github.com/algorithms-in-action/algorithms-in-action.github.io.git
-
Install all dependencies:
npm install
To start AIA execute:
npm start
While iterating on AIA code, you can run the following commands:
-
Start AIA:
npm start
-
Hack, hack, hack
-
Check if everything still runs in production mode:
npm run build npm install -g serve serve -s build
-
Create tests
-
Run all tests:
npm test
-
Commit code and create a pull request
The tests can be started via:
npm test
If you run into any trouble, please check the available npm scripts and the Jest documentation.
Follow the instructions in the algorithms README.
If you'd like to report a bug, please open an issue.
If you'd like to propose a change, please open a pull request.