npm-embedded-docs
v1.0.0
Published
CLI tool to embed documentation directly into your project for local access
Downloads
5
Maintainers
Readme
npm-embedded-docs
A CLI tool to embed documentation directly into your project for local access. Perfect for creating offline-accessible documentation that travels with your codebase.
Installation
npm install -g npm-embedded-docsOr use with npx:
npx npm-embedded-docsUsage
Basic Usage
Embed documentation from a docs folder to embedded-docs:
embed-docsCustom Paths
Specify custom source and target paths:
embed-docs ./my-docs ./local-docsCommand Options
# Embed with force overwrite
embed-docs -f
# Embed from custom source to custom target
embed-docs embed -s ./documentation -t ./embedded -f
# List embedded documentation
embed-docs listFeatures
- Local Documentation: Embed docs directly in your project
- Offline Access: Documentation available without internet
- Auto Navigation: Generates index file for easy browsing
- Flexible Paths: Configure source and target directories
- File Filtering: Only copies relevant documentation files (.md, .txt, .json)
- Recursive Copying: Maintains directory structure
API
EmbeddedDocs Class
import { EmbeddedDocs } from 'npm-embedded-docs';
const embeddedDocs = new EmbeddedDocs();
// Embed documentation
await embeddedDocs.embedDocs({
docsPath: './docs',
embeddedPath: './embedded-docs',
force: true
});
// List embedded docs
await embeddedDocs.listEmbeddedDocs();Use Cases
- Offline Development: Keep docs accessible without internet
- Code Reviews: Include relevant documentation in repositories
- Distributed Teams: Share documentation that travels with code
- CI/CD Integration: Embed docs as part of build process
- Documentation Archiving: Create snapshots of documentation
License
MIT
