feat: complete asset deployment for plugin engines
**Asset Deployment Infrastructure:** - Enhanced RenderingEngineManager with complete asset deployment - Automatic plugin source directory discovery and asset copying - File system operations with proper directory structure preservation - Comprehensive error handling for missing assets **CLI Integration:** - Automatic asset deployment when using plugin engines - Verbose output showing deployment progress and statistics - Asset verification and accessibility validation - Production-ready deployment to _markitect/plugins/ structure **TestDrive JSUI Assets:** - Complete CSS asset suite (editor, controls, GitHub theme) - Placeholder image assets for testing deployment - Proper asset organization following plugin conventions - All 18 assets now deployed correctly **Testing Infrastructure:** - Comprehensive asset deployment testing - CLI integration verification with asset shipping - File existence and accessibility validation - Complete directory structure verification **Key Features:** - Assets deployed to `_markitect/plugins/testdrive-jsui/` when using --edit - HTML references match deployed asset locations - 18 total assets: 12 JS, 3 CSS, 3 images - Automatic deployment without --ship-assets flag needed - Clean separation of development vs production asset handling **Example Output:** ``` 🎯 Using rendering engine: testdrive-jsui (supports: edit, view) 📦 Deploying assets for engine 'testdrive-jsui'... 📄 Deployed 18 asset files js: 12 files css: 3 files images: 3 files ✅ Rendered with INTERACTIVE editing mode ``` This fixes the "HTML assets not found" issue when using explicit output directories with plugin engines. All plugin assets are now properly deployed and accessible. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -266,6 +266,46 @@ config = RenderingConfig(
|
||||
3. **Cache Management**: Asset versioning and cache control
|
||||
4. **Error Handling**: Fallback for missing assets
|
||||
|
||||
### Asset Deployment Process
|
||||
|
||||
When using CLI with plugin engines, assets are automatically deployed:
|
||||
|
||||
```bash
|
||||
# Assets are deployed to output directory when using plugin engines
|
||||
markitect md-render --edit document.md --output /path/to/output.html
|
||||
|
||||
# Output structure:
|
||||
# /path/to/
|
||||
# ├── output.html
|
||||
# └── _markitect/
|
||||
# └── plugins/
|
||||
# └── testdrive-jsui/
|
||||
# ├── static/
|
||||
# │ ├── js/ # 12 JavaScript files
|
||||
# │ └── css/ # 3 CSS files
|
||||
# └── images/ # 3 image files
|
||||
```
|
||||
|
||||
The deployment process:
|
||||
|
||||
1. **Plugin Discovery**: Engine identified (default: testdrive-jsui for edit mode)
|
||||
2. **Asset Analysis**: Required assets determined from `get_required_assets()`
|
||||
3. **Source Resolution**: Plugin source directory located
|
||||
4. **File Copying**: Assets copied with directory structure preservation
|
||||
5. **URL Generation**: HTML references generated with correct paths
|
||||
6. **Verification**: Asset accessibility validated
|
||||
|
||||
Example output:
|
||||
```
|
||||
🎯 Using rendering engine: testdrive-jsui (supports: edit, view)
|
||||
📦 Deploying assets for engine 'testdrive-jsui'...
|
||||
📄 Deployed 18 asset files
|
||||
js: 12 files
|
||||
css: 3 files
|
||||
images: 3 files
|
||||
✅ Rendered with INTERACTIVE editing mode to: output.html
|
||||
```
|
||||
|
||||
## Configuration Interface
|
||||
|
||||
### Python → JavaScript Data Transfer
|
||||
|
||||
Reference in New Issue
Block a user