Thanks for your interest in Codemonkey. This guide shows how to run the project locally and how to propose a change.
Codemonkey is a static site in plain HTML, CSS and JavaScript. There is no build step, no package manager, no backend and no test suite. Everything runs in the browser.
- Git
- A modern desktop browser with a physical keyboard
- Optional: Python 3, if you want to serve the files with a local web server
git clone https://github.com/fizzexual/Codemonkey.git
cd CodemonkeyThere is nothing to install.
Open index.html directly:
start index.html # Windows
open index.html # macOSOr serve the folder with any static server, for example:
python -m http.server 8000Then visit http://localhost:8000.
index.html- the page markup and the<script>tagscss/style.css- layout and all theme palettes (CSS variables)js/app.js- typing engine, stats, graph andlocalStoragepersistencejs/themes.js- theme list, apply and persistjs/snippets.js- the language listjs/snippets/<language>.js- the code snippets for one language
Add a snippet. Add a string to the array in the matching
js/snippets/<language>.js file. Use spaces, not tabs. Do not leave trailing
whitespace. Make sure the code compiles or parses in its language.
Add a language. Create js/snippets/<id>.js containing
window.CODE_SNIPPETS["<id>"] = [ ... ]. Add a <script> tag for it in
index.html. Add an entry to LANGUAGES in js/snippets.js.
Add a theme. Add a [data-theme="your_theme"] block of CSS variables in
css/style.css. Add a matching entry to the THEMES list in js/themes.js.
There are no automated tests. Before you open a pull request:
- Open the site locally and finish at least one test in
timemode and one insnippetmode. - Check the language, theme or snippet you changed.
- Open the browser console and make sure there are no errors.
- If you touched input handling, try
Tab,Esc,EnterandBackspaceat the start of a line.
The live site is https://fizzexual.github.io/Codemonkey/. It is served by
GitHub Pages straight from the root of the main branch. There is no build
and no workflow. Every push to main updates the live site.
- Fork the repository.
- Create a branch from
mainwith a short, clear name. - Keep the pull request small and focused on one thing.
- In the description, say what you changed and why.
- Say how you checked it (see "Check your change").
- Open the pull request against
main.
For larger changes, open an issue first so we can agree on the approach.
Do not report security problems in a public issue. See SECURITY.md.
By contributing, you agree that your contributions are licensed under the MIT License.