Ink is a functional and minimalistic webapp to write documents in markdown and export them.
The structure of the repo is as follows:
src/
app.ts (Thin app entrypoint)
app/ (Feature modules: app-controller, ui-events, workspace-io, tree-render, dom, fs-api, types)
tags.ts (Tag/frontmatter parsing utilities)
test-support/
storage-fixture.ts (Test-only storage helpers)
styles.scss (The app styles, in SCSS)
dist/
app.min.js
styles.min.css
ink.template.html (The HTML template source)
ink-app.html (The final single-page app, with inline <style> and <script>)
build/
assemble-single-file.js
compile-and-assemble.js
build-test.js
generate-favicons.js
watch.js
inject.js (Compatibility alias)
build.js (Compatibility alias)
assets/
branding/
logo.svg
favicon.svg
tests/
qunit/
cypress/
e2e/
repomix-output.xml (This can be used to discuss about the project with an AI chatbot)
The workflow uses esbuild and sass.
- Build once:
npm run build - Build on file changes:
npm run watch - Makefile wrappers:
make buildmake watch
The webapp is released as a single HTML file (ink-app.html).
Canonical build entrypoint: build/compile-and-assemble.js (used by npm run build).
- Canonical logo source:
assets/branding/logo.svg - Generated favicon:
assets/branding/favicon.svg - Regenerate favicon after logo updates:
npm run build:favicon
npm run build also regenerates favicon assets before assembling ink-app.html.
Use this sequence when working on the app:
- Install dependencies (first time only):
npm install - Edit source files:
src/app.tssrc/tags.tssrc/styles.scssink.template.html
- Rebuild output:
npm run build - Open/use
ink-app.html
If you want automatic rebuilds while editing:
- Run:
npm run watch - Keep editing source files
ink-app.htmlwill be regenerated after changes
Automated testing includes both QUnit and Cypress.
- QUnit:
npm run test:qunit - Cypress end-to-end:
npm run test:cypress - Full suite:
npm test
The Cypress flow test verifies:
- Open/select a workspace
- Create a new markdown file
- Enter markdown content
- Save and verify persisted content
- Ctrl/Cmd + E: Create a new note
- Ctrl/Cmd + Shift + O: Open a workspace
- Ctrl/Cmd + S: Save the current note
- Ctrl/Cmd + L: Refresh the workspace
- Ctrl/Cmd + Shift + S: Export all notes as JSON
- Ctrl/Cmd + Shift + M: Export the current note as Markdown