@wangjs-jacky/interactive-tutorial
v0.1.1
Published
基于 React + Vite + MDX 的交互式教程框架,支持进度持久化与主题切换
Downloads
196
Maintainers
Readme
Interactive Tutorial Framework
An interactive tutorial framework built with React + Vite + MDX.
Features
- Tutorial content structure based on
content/<tutorial>/config.json+steps/*.mdx - Multi-tutorial hall mode with tutorial cards and progress overview
- Persistent progress and theme switching
- Keyboard navigation (
←/→,PageUp/PageDown) - CLI commands to serve or build tutorials quickly
Project Structure
.
├── bin/ # executable entrypoint
├── cli/ # CLI implementation
├── content/ # tutorial content source
├── src/ # application source code
├── tests/
│ ├── cli/ # CLI unit tests (node:test)
│ ├── unit/ # frontend unit tests (Jest)
│ └── e2e/ # E2E tests (Playwright)
└── docs/Installation
npm installUsage
npm run devCLI
# install globally
npm install -g @wangjs-jacky/interactive-tutorial
# serve tutorials
interactive-tutorial serve /absolute/path/to/content
interactive-tutorial serve ./content --tutorial example-tutorial --port 5174 --open
# build static output
interactive-tutorial build /absolute/path/to/content --output /absolute/path/to/output
interactive-tutorial build ./content --output ./dist --tutorial example-tutorialCommon options:
serve:--tutorial <name>,--port <number>,--host <host>,--openbuild:--tutorial <name>,--output <outputDir>
Testing
npm run test
npm run test:cli
npm run test:unitLicense
MIT
