Co-authored-by: estruyf <2900833+estruyf@users.noreply.github.com>
4.7 KiB
Quick Start Guide for Maintainers
This guide helps you quickly test and publish Front Matter Lite.
Prerequisites
- Node.js 18+
- VS Code installed
- (Optional) vsce installed globally:
npm install -g @vscode/vsce
Build and Test (5 minutes)
1. Build the Extension
cd lite
npm install
npm run build
Expected output: dist/extension-web.js created successfully (~12KB)
2. Test in VS Code Extension Development Host
# From the lite directory, press F5 in VS Code
# OR run:
code --extensionDevelopmentPath=/path/to/lite
This opens a new VS Code window with the extension loaded.
3. Test Virtual Workspace Features
In the Extension Development Host:
- Open Command Palette (F1)
- Run: "Open Remote Repository"
- Enter: Any GitHub repo URL (e.g.,
https://github.com/microsoft/vscode) - Verify:
- "Front Matter Lite" appears in Activity Bar
- Dashboard loads
- Information message about virtual workspace mode appears
4. Test Core Features
Register a Folder:
- In Explorer, right-click any folder
- Select "Front Matter Lite > Register Content Folder (Lite)"
- Enter a title
- Check dashboard shows the folder
Create Content:
- Click "Create Content" in dashboard
- Select folder
- Enter file name
- Verify file is created with front matter
Package for Distribution
Create VSIX File
cd lite
vsce package
Output: vscode-front-matter-lite-10.9.0.vsix
Test VSIX in github.dev
- Navigate to any GitHub repo
- Press
.to open github.dev - Install extension:
- Extensions → "..." menu → "Install from VSIX..."
- Select the generated
.vsixfile
- Test features
Publish to Marketplace
Prerequisites
- Azure DevOps account
- Personal Access Token (PAT) with Marketplace publish permissions
- Publisher ID set up
Publish
# First time setup
vsce login <publisher-name>
# Publish
cd lite
vsce publish
Update Version
# In package.json, update version
# Then publish with:
vsce publish minor # or major, patch
Development Workflow
Watch Mode
npm run dev
Keep this running while developing. Press F5 to test changes.
Make Changes
- Edit source files in
src/ - Save (watch mode rebuilds automatically)
- Reload Extension Development Host (Ctrl+R in dev window)
- Test changes
Debug
- Set breakpoints in source files
- Press F5
- Trigger the feature in dev host
- Debugger stops at breakpoints
Common Tasks
Update Front Matter Template
Edit in src/extension.ts (~line 170):
const content = `---
title: ${fileName}
description:
date: ${date}
tags: []
draft: false // Add new field
---`;
Change Dashboard UI
Edit src/DashboardProvider.ts _getHtmlForWebview() method.
Add New Command
- Register in
package.jsoncontributes.commands - Implement in
src/extension.ts - Add to menu if needed
Modify Configuration Schema
Update package.json contributes.configuration.properties
Troubleshooting
Build Fails
# Clean and rebuild
rm -rf node_modules dist
npm install
npm run build
Extension Not Loading
Check:
dist/extension-web.jsexistspackage.jsonhas correctbrowserentry point- Output channel for errors
Virtual Workspace Not Detected
Ensure workspace scheme is not 'file':
- github.dev uses 'vscode-vfs'
- Check Output channel for detection message
Quality Checks
Before publishing:
# Build
npm run build
# Check size (should be ~12KB)
ls -lh dist/extension-web.js
# Lint (if you add linting)
npm run lint
# Package
vsce package
Integration with Main Extension
The lite version is independent but uses compatible configuration:
{
"frontMatter.content.pageFolders": [
{ "title": "Blog", "path": "content/blog" }
]
}
This works in both full and lite versions.
Support
For issues:
- Check Output channel "Front Matter Lite"
- Check browser console (F12 in github.dev)
- Review error messages
- Check GitHub issues
Next Steps
After testing:
- ✅ Verify features work
- ✅ Test in github.dev
- ✅ Get user feedback
- 📋 Iterate on improvements
- 🚀 Publish to marketplace
- 📢 Announce to users
Quick Commands Reference
# Install dependencies
npm install
# Build for production
npm run build
# Build for development (watch mode)
npm run dev
# Package extension
vsce package
# Publish extension
vsce publish
# Test in VS Code
code --extensionDevelopmentPath=$(pwd)
Files to Review
package.json- Extension manifestsrc/extension.ts- Main logicsrc/DashboardProvider.ts- UIREADME.md- User documentation
That's it! You're ready to test and publish Front Matter Lite. 🚀