Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
930275e
fix: improve Windows support for npm scripts
dougwithseismic Dec 14, 2025
2fe9b25
feat: migrate WASM build system from Make to CMake for Windows support
dougwithseismic Dec 14, 2025
fc60c4e
fix: improve error handling in build script and remove legacy Makefiles
dougwithseismic Dec 14, 2025
b9408f7
fix(setup-and-dependencies.md): better styles
Ryan-Millard Dec 15, 2025
53c9ef5
remove(pnpm file): Not relevant in this PR
Ryan-Millard Dec 16, 2025
785c3ed
update(CMakeLists.txt files): Ensure consistency & clarity
Ryan-Millard Dec 18, 2025
2e5fa81
feat(docker compose): Set up basic docker usage with CLI script
Ryan-Millard Dec 19, 2025
c4f1696
feat(img2num CLI): Add bat & ps1 scripts for windows users
Ryan-Millard Dec 19, 2025
f84c076
feat(img2num script): Add disclaimer comment for Windows users
Ryan-Millard Dec 19, 2025
26a0832
fix(img2num scripts): Handle args to npm scripts properly
Ryan-Millard Dec 19, 2025
7689a9f
fix(img2num bash script, docs): Forward ports properly & add disclaimer
Ryan-Millard Dec 20, 2025
9776dde
fix(img2num windows scripts): align with bash counterpart, fix commen…
Ryan-Millard Dec 20, 2025
98544a5
fix(img2num bash script): Make executable & add to tracking
Ryan-Millard Dec 20, 2025
1a65ab6
fix(Dockerfile): switch to node:22-bullseye, the latest stable release
Ryan-Millard Dec 20, 2025
c83644c
docs(Makefile references): Switch to CMake where appropriate
Ryan-Millard Dec 20, 2025
eb8584f
docs(setup & dependencies): Update node version to most accurate for …
Ryan-Millard Dec 20, 2025
c71f672
fix(img2num scripts): Duplicate clean arg removed
Ryan-Millard Dec 20, 2025
b5498e0
fix(imng2num scripts): Provide proper exit codes for success and fail…
Ryan-Millard Dec 20, 2025
09695ca
docs(setup & deps): Fix header & code block - use ## instead of #, sp…
Ryan-Millard Dec 20, 2025
1248d8d
chore(img2num.bat): remove duplicate comment
Ryan-Millard Dec 20, 2025
a051603
chore(build-wasm.js): Add helpful log regarding rm -rf
Ryan-Millard Dec 20, 2025
bdda9a0
chore(img2num sh script): Fix wording
Ryan-Millard Dec 20, 2025
2ee0b07
fix(img2num scripts): stop hiding docker errors - allows users to tro…
Ryan-Millard Dec 20, 2025
caff168
refactor(img2num scripts): add purge arg, better container management
Ryan-Millard Dec 20, 2025
49891ef
feat(.editorconfig): Add bash, batch, powershell support
Ryan-Millard Dec 20, 2025
5ea0721
feat(docker-compose.yml): add remote image ryanmillard/img2num-dev:la…
Ryan-Millard Dec 20, 2025
0b745d8
docs(getting-started): update comprehensive installation and first-ru…
Ryan-Millard Dec 21, 2025
0de2ac7
docs(getting-started): add tip on help args for img2num script
Ryan-Millard Dec 21, 2025
9c30b94
docs(getting-started): add tip on help npm script for local users
Ryan-Millard Dec 21, 2025
002802b
docs(intro page): fix grammatical error
Ryan-Millard Dec 21, 2025
0e9fae5
Merge remote-tracking branch 'origin/main' into feat/docker-docker-co…
Ryan-Millard Dec 22, 2025
80ac27e
docs(README.md): update README.md disclaimer comment for better PR re…
Ryan-Millard Dec 22, 2025
9a24995
docs(fix intro links): remove redundant, use HTTPS for Blank Issue link
Ryan-Millard Dec 22, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .devcontainer/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/env bash
set -euo pipefail

# Source emsdk environment
if [ -f "${EMSDK_ROOT}/emsdk_env.sh" ]; then
source "${EMSDK_ROOT}/emsdk_env.sh"
fi

# Go to workdir
cd /usr/src/app

exec "$@"
8 changes: 8 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
node_modules/*
dist/*
build/*
docs/build/*
.vscode
.git
.gitignore
.DS_Store
66 changes: 63 additions & 3 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,25 @@ insert_final_newline = true
max_line_length = 120

# -------------------------
# Makefile
# CMake
# -------------------------
[Makefile]
indent_style = tab
[CMakeLists.txt]
indent_style = space
indent_size = 2
charset = utf-8
end_of_line = lf
trim_trailing_whitespace = true
insert_final_newline = true
max_line_length = 120

[*.cmake]
indent_style = space
indent_size = 2
charset = utf-8
end_of_line = lf
trim_trailing_whitespace = true
insert_final_newline = true
max_line_length = 120

# -------------------------
# JavaScript / React
Expand Down Expand Up @@ -130,3 +145,48 @@ max_line_length = off
[LICENSE]
max_line_length = off
trim_trailing_whitespace = false

# -------------------------
# Bash / Shell scripts
# -------------------------
[*.{sh,bash}]
indent_style = space
indent_size = 2
charset = utf-8
end_of_line = lf
trim_trailing_whitespace = true
insert_final_newline = true
max_line_length = 120
# img2num is in bash
[img2num]
indent_style = space
indent_size = 2
charset = utf-8
end_of_line = lf
trim_trailing_whitespace = true
insert_final_newline = true
max_line_length = 120

# -------------------------
# Batch scripts
# -------------------------
[*.{bat,cmd}]
indent_style = space
indent_size = 2
charset = utf-8
end_of_line = crlf
trim_trailing_whitespace = true
insert_final_newline = true
max_line_length = 120

# -------------------------
# PowerShell scripts
# -------------------------
[*.ps1]
indent_style = space
indent_size = 2
charset = utf-8
end_of_line = crlf
trim_trailing_whitespace = true
insert_final_newline = true
max_line_length = 120
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,8 @@ dist-ssr
*:Zone.Identifier

src/data/contributor-credits.json

# CMake build artifacts
src/wasm/cmake-build/
src/wasm/**/CMakeCache.txt
src/wasm/**/CMakeFiles/
42 changes: 42 additions & 0 deletions Dockerfile.dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# ------------------------
# Img2Num Dockerfile.dev
# ------------------------
FROM node:22-bullseye

ENV EMSDK_VERSION=4.0.10
Comment thread
Ryan-Millard marked this conversation as resolved.
ENV EMSDK_DIR=/opt/emsdk

RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
cmake \
python3 \
git \
curl \
unzip \
pkg-config \
bash \
ca-certificates \
libvips-dev \
&& rm -rf /var/lib/apt/lists/*

# Install EMSDK once, cached by Docker layers
RUN git clone --depth 1 https://github.com/emscripten-core/emsdk.git $EMSDK_DIR \
&& cd $EMSDK_DIR \
&& git fetch --tags \
&& git checkout $EMSDK_VERSION \
&& ./emsdk install $EMSDK_VERSION \
&& ./emsdk activate $EMSDK_VERSION

ENV PATH=$EMSDK_DIR:$EMSDK_DIR/upstream/emscripten:$PATH
ENV EMSDK=$EMSDK_DIR

RUN npm install -g npm@11

WORKDIR /usr/src/app

ENV CHOKIDAR_USEPOLLING=true
ENV CHOKIDAR_INTERVAL=100

EXPOSE 5173 3000

CMD ["bash"]
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<!--TODO: Remove the section below after #93 is merged on 22 Dec 2025-->

<!--TODO: Remove the section below after #139 (which replaced #93) is merged on 22 Dec 2025 - wait 2 weeks, so remove this on 5 Jan 2026 -->
> [!CAUTION]
> ⚠️⚠️⚠️ **Breaking Change in [PR #93](https://github.com/Ryan-Millard/Img2Num/pull/93)** ⚠️⚠️⚠️
>
Expand Down
25 changes: 25 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
services:
dev:
image: ryanmillard/img2num-dev:latest
build:
context: .
dockerfile: Dockerfile.dev
container_name: img2num-dev
working_dir: /usr/src/app
volumes:
- .:/usr/src/app:cached
- node_modules:/usr/src/app/node_modules
- docs_node_modules:/usr/src/app/docs/node_modules
environment:
CHOKIDAR_USEPOLLING: "true"
CHOKIDAR_INTERVAL: "100"
ports:
- "5173:5173" # Vite dev
- "4173:4173" # Vite preview
- "3000:3000" # Docusaurus dev
stdin_open: true
tty: true

volumes:
node_modules:
docs_node_modules:
2 changes: 1 addition & 1 deletion docs/docs/guidelines/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ The [Project Scripts](../project-scripts/overview.md) section shows all of the a
## Additional Resources

- [README](https://github.com/Ryan-Millard/Img2Num/blob/main/README.md)
- [Orchestrator Makefile](https://github.com/Ryan-Millard/Img2Num/blob/main/src/wasm/Makefile)
- [Orchestrator CMakeLists.txt](https://github.com/Ryan-Millard/Img2Num/blob/main/src/wasm/CMakeLists.txt)
- [Vite Config](https://github.com/Ryan-Millard/Img2Num/blob/main/vite.config.js)
- [ESLint Config](https://github.com/Ryan-Millard/Img2Num/blob/main/eslint.config.js)

Expand Down
5 changes: 1 addition & 4 deletions docs/docs/guidelines/coding-style.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ sidebar_position: 3

## 🌐General Rules
- **Follow `.editorconfig`** exactly:
- Indent: **2 spaces** (except Makefile: tabs)
- Indent: **2 spaces**
- Charset: **UTF-8**
- Line endings: **LF**
- Max line length: 120 (off for JSON, Markdown, lock files, images)
Expand Down Expand Up @@ -93,9 +93,6 @@ namespace exampleNamespace
- Final newline: true (lock files: false)
- Max line length: off

## πŸ“ Makefiles
- Indent: **tabs only**

## πŸ–Ό Images / Binary Assets
- Charset: binary
- Do not trim trailing whitespace
Expand Down
31 changes: 13 additions & 18 deletions docs/docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,38 +10,33 @@ Img2Num is a lightweight, high-performance C++ library (compiled to WebAssembly)

Whether you're a beginner or an advanced user, you'll find everything you need here to get started and master Img2Num.

---

## Features

- ⚑ **Fast & Efficient**: Optimized for large images.
- πŸ–ΌοΈ **Image to Numeric Conversion**: Seamlessly convert images to arrays.
- 🌐 **WebAssembly Ready**: Run directly in the browser.
- πŸ”§ **Developer-Friendly**: Easy-to-use API for rapid integration.

---

## Getting Started

1. **Installation**
Follow the [installation guide](./introduction/getting-started.md) to set up Img2Num quickly.

2. **Usage Examples**
Learn how to process images with our [code examples](./).

3. **Advanced Topics**
Explore performance tips, SIMD intrinsics, and optimization tricks in [advanced guides](./).

---
Follow the [installation guide](./introduction/getting-started.md) to set up Img2Num quickly.

## Quick Links

- [Overview](./introduction/getting-started.md) – Project introduction and setup
- [Changelog](/changelog) – Track releases and updates
- [Examples](./) – Ready-to-use snippets and demos
- [FAQ](./) – Common questions answered

---

Enjoy using **Img2Num**!
For issues or contributions, visit our [GitHub repository](https://github.com/Ryan-Millard/Img2Num).
We hope you enjoy using **Img2Num**!
For issues or contributions, visit our
[GitHub repository](https://github.com/Ryan-Millard/Img2Num/issues?q=is%3Aissue%20state%3Aopen%20label%3A%22good%20first%20issue%22).

:::important
If you spot something wrong in the documentation or elsewhere, please help the community by opening an issue for it!

Issue links:
- [Bug Report](https://github.com/Ryan-Millard/Img2Num/issues/new?template=bug_report.yml)
- [Refactor / Code Quality Improvement](https://github.com/Ryan-Millard/Img2Num/issues/new?template=refactor.yml)
- [Blank Issue](https://github.com/Ryan-Millard/Img2Num/issues/new)
:::
Loading