This document provides step-by-step instructions to build the Firefox version of Markdown Printer from source.
- Operating System: macOS, Linux, or Windows
- Node.js: v18 or higher
- npm: v9 or higher (comes with Node.js)
- zip utility: Built into macOS/Linux, available on Windows via PowerShell
This extension uses the following open-source library:
- Turndown.js v7.2.0 - HTML to Markdown converter
- License: MIT
- Source: https://github.com/mixmark-io/turndown
- Downloaded from: https://cdn.jsdelivr.net/npm/turndown@7.2.0/dist/turndown.js
-
Clone the repository
git clone https://github.com/levz0r/markdown-printer.git cd markdown-printer -
Run the build script
npm run build:firefox
This command will:
- Read the version from
package.json - Generate the Firefox manifest with proper browser-specific settings
- Copy all source files to
extension-firefox/directory - Create a zip package in
dist/markdown-printer-firefox-v{version}.zip
- Read the version from
-
Verify the build
The output package will be located at:
dist/markdown-printer-firefox-v{version}.zipThis zip file contains:
manifest.json- Firefox-specific manifest (generated from build.js)background.js- Background script (source file, not minified)popup.html- Extension popup UIpopup.js- Popup script (source file, not minified)turndown.js- Third-party library (see above)- Icon files (16px, 48px, 128px)
All source files are in the repository root and extension-firefox/ directory:
/build.js- Build automation script/package.json- Version and build configuration/extension-firefox/background.js- Main extension logic/extension-firefox/popup.html- Popup UI/extension-firefox/popup.js- Popup script/extension-firefox/turndown.js- Third-party library (Turndown.js v7.2.0)/extension-firefox/icon*.png- Extension icons
- No transpilation, minification, or obfuscation is used for any source files
- The only "build" step is copying files and generating the manifest.json with version information
turndown.jsis included as-is from the official CDN (see Third-Party Libraries section)