Development
MdStyled is written in TypeScript and bundled with esbuild.
Setup
git clone https://github.com/OsamaAbuSitta/MDStyled.git
cd MDStyled
npm install
Compile & watch
npm run compile # one-time build
npm run watch # rebuild on changes
Run locally
Press F5 in VS Code to launch an Extension Development Host for testing. The extension activates on Markdown files.
Layout
src/
├── engine/
│ ├── config.ts # mdstyled.config.json resolution
│ ├── extensions.ts # built-in preview extensions
│ ├── index.ts
│ ├── parser.ts # comment parsing (directives + selectors)
│ ├── renderer.ts # markdown-it rendering
│ ├── transformer.ts # AST annotation
│ └── types.ts
├── defaultTemplate.ts
├── extension.ts # activation + commands
├── previewProvider.ts # Webview preview
└── templates.ts
templates/ # bundled theme templates
samples/ # example Markdown files
Tests
npm test
Docs
This documentation site lives in docs/ and is built with Docusaurus.
cd docs
npm install
npm start # local dev server
npm run build