Electron Skill
🤖 AI Integration Guide: Send this page link to AI for automatic integration guidance
Quick Information
- Application Type: Electron
- Skill Version: 1.0.0
- Integration Difficulty: ⭐⭐ (Easy)
- Estimated Time: 15 minutes
🎯 Integration Steps
Step 1: Install Dependencies
bash
npm install electron-updaterStep 2: Create dev-update.yml
Create dev-update.yml in the project root directory:
yaml
provider: generic
updaterCacheDirName: your-app-updaterStep 3: Add Main Process Code
typescript
import { autoUpdater } from 'electron-updater';
import { app } from 'electron';
// Check for updates
async function checkForUpdates() {
const FeedURL = `https://api.upgrade.toolsetlink.com/v1/electron/upgrade?electronKey=YOUR_ELECTRON_KEY&versionName=${app.getVersion()}&appointVersionName=&devModelKey=&devKey=&platform=${process.platform}&arch=${process.arch}`;
autoUpdater.setFeedURL({
url: FeedURL,
provider: 'generic',
});
autoUpdater.requestHeaders = {
'X-AccessKey': 'YOUR_ACCESS_KEY',
};
const result = await autoUpdater.checkForUpdates();
return result;
}
// Download update
async function downloadUpdate() {
const result = await checkForUpdates();
if (result?.updateInfo) {
autoUpdater.setFeedURL({
url: result.updateInfo.path,
provider: 'generic',
});
await autoUpdater.downloadUpdate();
}
}⚠️ Note: Replace YOUR_ELECTRON_KEY and YOUR_ACCESS_KEY with your actual keys
🤖 AI Integration
Send this page link to AI:
Please help me integrate Electron application upgrade, here's the Skill link:
https://www.toolsetlink.com/en/upgrade/skill/electronAI will automatically:
- Identify the application type as Electron
- Retrieve configuration information and code examples
- Guide you to replace placeholders
- Verify configuration correctness
- Complete integration testing
📋 Complete Example
View complete example project: electron-demo
❓ FAQ
Q: How to get Electron Key?
A: Log in to UpgradeLink dashboard, create an Electron application to obtain it.
Q: How to get Access Key?
A: Log in to UpgradeLink dashboard, obtain it from the key management page.
Q: What if update fails?
A: Check network connection and configuration, or contact AI for help.