🔥 Gulp Runner — VS Code Extension
✨ What's InsideGulp Runner gives SPFx / React-for-SharePoint developers a persistent sidebar panel that replaces repetitive terminal commands with a clean, visual interface. 🖥 UI OverviewThe panel is divided into six sections:
⚡ Features🔥 Build UI PackageRuns all 4 SPFx production build commands in sequence with a single click:
The pipeline stops automatically if any step fails, and shows exactly which step caused the problem. 👁 Watch ModeToggles 📦 NPM InstallRuns 🗑 Clean Node ModulesA nuclear reset button. Shows a confirmation dialog before:
Useful when dependencies get into a broken state (happens often in SPFx projects). 📁 Workspace Auto-detectOn startup, the extension checks whether the open folder is a valid SPFx project by looking for:
🔧 Node & Gulp Version CheckerAutomatically runs ⏱ Build TimerEvery pipeline step shows how long it took (e.g. 🔔 Build NotificationsWhen a long pipeline finishes (or fails), a VS Code popup notification appears — even if you've switched to another tab or window. You can kick off a build and keep working without watching the log. ⚠️ Error Summary PanelAfter a failed build, instead of scrolling through hundreds of lines of gulp output, a red summary box appears below the log showing only the relevant error lines. Find the actual TypeScript or config error in seconds. 🕐 Command History LogEvery pipeline run is saved (last 20 entries) with:
History persists across VS Code sessions. ⛔ Cancel ButtonAppears while any pipeline is running. Kills the active process immediately via 📋 Prerequisites
🚀 Getting StartedRun in Development Mode (no packaging needed)
📦 Packaging & PublishingPackage as
|
| Command | Description |
|---|---|
npm run compile |
Compile TypeScript once |
npm run watch |
Watch mode — recompile on save |
npx vsce package |
Build .vsix installer |
npx vsce publish |
Publish to VS Code Marketplace |
➕ Adding More Buttons
The extension is built to grow. To add a new pipeline:
1. Add a handler in the onDidReceiveMessage switch in extension.ts:
case 'runDeploy':
await this._runPipeline('Deploy to SharePoint', [
{ cmd: 'm365 spo app add --filePath ...', label: 'Upload .sppkg' },
{ cmd: 'm365 spo app deploy --name ...', label: 'Deploy app' },
]);
break;
2. Add a button in _getHtml():
<button class="btn btn-secondary" id="btnDeploy" onclick="send('runDeploy')">
🚀 Deploy to SharePoint
</button>
3. Disable it during runs — add it to the setRunning array in the webview script:
[btnBuild, btnInstall, btnClean, btnDeploy].forEach(b => b.disabled = val);
That's all — the pipeline stepper, log, history, timer, and notifications all work automatically for any new pipeline you add.
🐛 Troubleshooting
| Problem | Fix |
|---|---|
gulp: command not found |
Run npm install -g gulp-cli |
No workspace folder found |
Open your SPFx project folder before running |
| Workspace shows ⚠️ yellow | Check that gulpfile.js exists and package.json has @microsoft/sp-* deps |
Version chips show N/A |
Node or Gulp not on system PATH — restart VS Code after installing |
| Watch mode doesn't stop | Click the red ⏹ Stop Watch Mode button, or reload VS Code window |
vsce package fails on Node 18 |
Use npx vsce package with local vsce @2.15.0 |
| Extension not appearing after compile | Ctrl+Shift+P → Developer: Reload Window |
| History not persisting | This uses globalState — check extension host isn't sandboxed |
📅 Changelog
v0.2.0
- ✅ Workspace auto-detect (SPFx project validation)
- ✅ Node / npm / Gulp version checker
- ✅ Watch mode (
gulp servetoggle) - ✅ NPM Install button
- ✅ Clean Node Modules (with confirmation)
- ✅ Build timer (per step + total)
- ✅ Build notifications (VS Code popup)
- ✅ Error summary panel
- ✅ Command history log (last 20 runs, persistent)
v0.1.0 — v0.0.1
- ✅ Build UI Package pipeline (clean → build → bundle → package-solution)
- ✅ Pipeline step indicator
- ✅ Live log output
- ✅ Cancel button
📄 License
MIT — free to use, modify, and distribute.
🙌 Author
Abhishek Panigrahi — Marketplace Profile