Development
This guide covers how to build and publish the Flint extension.
Prerequisites
- Node.js 22+
- npm
- VS Code
vsce(Visual Studio Code Extension manager)
Setup
- Clone the repository:
git clone https://github.com/bw-design-group/flint-vscode-extension.git
cd flint-vscode-extension
- Install dependencies:
npm install
Building
Development Build
For testing locally:
npm run compile
Watch Mode
Auto-compile on changes:
npm run watch
Testing
Run Extension in Debug Mode
- Open the project in VS Code
- Press
F5to launch a new VS Code window with the extension loaded - Test your changes in the new window
Run Tests
npm test
Publishing
Prerequisites for Publishing
- Install vsce:
npm install -g @vscode/vsce
- Get a Personal Access Token from Azure DevOps or use your publisher account
Package the Extension
Create a .vsix file:
vsce package
Publish to Marketplace
vsce publish
Or publish a specific version:
vsce publish minor # Bumps minor version
vsce publish major # Bumps major version
vsce publish 1.2.3 # Specific version
Publish Pre-release
vsce publish --pre-release
Project Structure
flint-vscode-extension/
├── src/
│ ├── extension.ts # Extension entry point
│ ├── commands/ # Command implementations
│ ├── providers/ # Tree data providers
│ ├── services/ # Core services
│ └── utils/ # Utility functions
├── package.json # Extension manifest
├── tsconfig.json # TypeScript configuration
└── flint.config.json # Example configuration
Key Files
package.json- Extension manifest with commands, settings, and dependenciessrc/extension.ts- Main entry point that registers commands and providersflint.config.json- Example configuration for testing
Making Changes
- Make your changes
- Run
npm run compileto build - Test in debug mode (
F5) - Run
npm run lintto check code style - Commit and push your changes
Version Management
The version is managed in package.json. Follow semantic versioning:
- Major: Breaking changes
- Minor: New features
- Patch: Bug fixes
Useful Commands
# Clean and rebuild
npm run clean && npm run compile
# Run linter
npm run lint
# Package for distribution
vsce package
# Show extension info
vsce show Keith-gamble.ignition-flint
Troubleshooting
Build Errors
- Delete
node_modulesandpackage-lock.json - Run
npm installagain - Make sure TypeScript version matches
tsconfig.json
Publishing Errors
- Ensure you're logged in:
vsce login your-publisher-name - Check your Personal Access Token is valid
- Verify version number is higher than published version
Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
For more details, see the repository.