This repository contains the HLS Downloader browser extension. Follow these rules when automating changes or submitting pull requests.
-
The project is a pnpm workspace with several packages under
src/:core– shared business logic implemented in TypeScript. Source files live insrc/core/srcand compile tosrc/core/lib.background– initializes the extension store and wires services such asIndexedDBFS,FetchLoaderandM3u8Parser.popup– React user interface for interacting with playlists and downloads.design-system– UI component library consumed by the popup.assets– extension manifest and icons.
-
Business logic should reside in
src/core. Implement new features asuse-casesundersrc/core/src/use-casesand orchestrate them through epics insrc/core/src/controllers. Background scripts should only coordinate these functions. -
UI components should come from
src/design-system/srcto keep styling consistent across the extension.
- Install dependencies with
pnpm installwhen necessary. - Run
pnpm testfrom the project root to execute package test suites. - Run
pnpm run buildto build all packages and producedist/,extension-chrome.zipandextension-firefox.xpi. - Remove
dist/and generated archives after verifying the build to keep the working tree clean.
- Use
pnpm run devfor watch mode. It runs the background, popup, core and design-system builds in parallel while copying assets todist/.
- Do not commit
dist/,extension-chrome.zip,extension-firefox.xpiorextension-archive.zip; they are temporary build outputs listed in.gitignore.
- Use two spaces for indentation in all
.ts,.tsx,.jsand.jsonfiles. - Do not edit
src/core/libdirectly – it is generated from the TypeScript sources insrc/core/src.
- Follow
<type>: <summary>format for commit messages, e.g.feat: add download button. - Common types include
feat,fix,chore,test, anddocs.
- If build steps or project layout change, update
README.mdso new contributors can build the project without surprises. - Additional contribution policies are documented in
CONTRIBUTING.mdand the code of conduct.