本文へスキップ
製品デスクトップツールTASTECAD図面の確認TASTEFILESファイル管理TASTEFTPファイル転送TASTESSHリモートワークスペースTASTEZIP圧縮と展開TASTEWINMファイル管理開発ツールTASTECODERust 統合開発環境TASTESTUDIO統合開発・テスト環境TASTEETLデータ統合(ETL)サーバーTASTEREMOTEリモートデスクトップサーバーTASTEGEO空間情報サーバーTASTEMAILメールワークスペース投資TASTESTOCK株式自動売買デスクトップアプリはじめるダウンロードドキュメント購入すべての製品
マーケットプレイス
ニュース
技術ニュース今日の開発ニュース開発ドキュメントプログラミング言語RustTypeScriptJavaScriptPythonGoC#JavaCC++KotlinDartWebフロントエンド フレームワークNext.jsReactVue.js · NuxtSvelteKitAngularサーバー フレームワークSpring BootDjangoFastAPIASP.NET CoreNestJS · Expressアプリ・デスクトップ フレームワークTauriFlutterReact NativeElectronアルゴリズムアルゴリズムの基礎主要アルゴリズム発展アルゴリズム実務のアルゴリズム
コミュニティプロジェクト開発ログプロンプトAIツールの問題ショーケースコミュニティガイド
協業技術移転ウェブサイト構築デスクトップアプリ構築リリース・決済パイプライン販売パートナーお問い合わせ
サービスリモートデスクトップインストールパッケージのカスタマイズ
TASTEDEV
製品

デスクトップツール

TASTECAD複雑な図面を、軽やかにひらくTASTEFILES必要なファイルだけを、最速でTASTEFTPファイルが行き交う、いちばん端正な道TASTESSHサーバーとあなたを、より確かにつなぐTASTEZIPより速くまとめ、より安全にひらくTASTEWINM2つの画面で整理する、キーボード中心のファイルマネージャー

開発ツール

TASTECODERust アプリの編集・ビルド・デバッグ・テストまでひとつのウィンドウでTASTESTUDIO編集からリモートテスト、承認した AI 修正までTASTEETL値を見ながら、データを運ぶ

サーバー

TASTEREMOTE自社サーバーで運用するリモートデスクトップTASTEGEOGeoServer 互換の空間情報サーバーを Rust で作り直しますTASTEMAILメールの主導権を、もう一度自分の手に

投資

TASTESTOCKいつ・何を。自分で決めたルールどおりに動く株式自動売買

はじめる

ダウンロード全製品の最新版ドキュメント各製品の使い方購入サブスクリプション・永久ライセンスすべての製品全製品を一覧で
すべての製品
マーケットプレイスニュース
技術

ニュース

今日の開発ニュース言語・フレームワーク・GitHub・AI の公式発表開発ドキュメント言語・フレームワーク・アルゴリズムのガイド

プログラミング言語

RustTypeScriptJavaScriptPythonGoC#JavaCC++KotlinDart

フレームワーク

Webフロントエンド フレームワークNext.jsReactVue.js · NuxtSvelteKitAngular
サーバー フレームワークSpring BootDjangoFastAPIASP.NET CoreNestJS · Express
アプリ・デスクトップ フレームワークTauriFlutterReact NativeElectron

アルゴリズム

アルゴリズムの基礎計算量解析 · ソート · 探索 · 基本データ構造 · 木構造とヒープ主要アルゴリズムグラフ探索 · 最短経路と最小全域木 · 動的計画法 · 貪欲法 · 分割統治法 · バックトラッキング発展アルゴリズム文字列アルゴリズム · 数学と整数論 · ビット演算 · セグメント木 · Union-Find実務のアルゴリズムコーディング面接対策 · LRUキャッシュ · レート制限 · コンシステントハッシュ法
開発ドキュメントをすべて見る
コミュニティ
プロジェクトビルダーと作品を探す開発ログ決定と試行錯誤プロンプト再利用できる指示AIツールの問題Claude・Codex・Gemini の問題と回避策ショーケース完成した成果コミュニティガイドオープンにつくる方法
協業
技術移転Rust・egui でネイティブアプリを作るウェブサイト構築10言語、アカウント、ドキュメントとダウンロードデスクトップアプリ構築Rust・egui、WebView なしリリース・決済パイプライン署名・MSI・deb・rpm・AppImage・ハッシュ販売パートナー紹介して決済額の30%お問い合わせ構築・提携・投資のご相談
サービス
リモートデスクトップブラウザから自分のパソコンへインストールパッケージのカスタマイズ必要な機能だけ、設定は事前に
購入
JA
한국어EnglishDeutschEspañolFrançaisItalianoPortuguês (Brasil)日本語简体中文繁體中文
ログイン
ログイン
TASTEDEV

小さなツールから、より良い開発へ。

support@tastedev.netTASTEDEVを支援
製品製品ラインナップ購入ドキュメントダウンロードマーケットプレイスサポート
コミュニティプロジェクト開発ログプロンプトAIツールの問題ショーケース
ポリシー会社概要プライバシーポリシー利用規約サブスクリプション規約返金ポリシーコミュニティガイドライン
アカウントログイン新規登録
訪問者
今日
昨日
累計閲覧
商号
GXSOFT
代表者
CHOI YOUNG GU
事業者登録番号
853-44-00368
所在地
9F V24, 351 Gyeongin-ro, Michuhol-gu, Incheon, Republic of Korea
電話
+82-10-4404-1523
メール
whitecalvin@tastedev.net
個人情報保護責任者
CHOI YOUNG GU

© 2026 TASTEDEV製品情報は検証済みの開発ソースに基づいています。リリース・改善中

Electron ドキュメント
Electron
Getting Started with ElectronProject StructureCore ConceptsData and StateTestingDeployment
ディスカッション

Electron ガイド · 1/6

Getting Started with Electron

この章は現在、英語でのみ提供しています。

This chapter sets up a development environment and builds a first desktop app from an empty folder. Along the way you will scaffold a project with Electron Forge, the official tooling, and learn how to debug the main process from your editor.

Prepare Node.js

Electron is distributed as an npm package and driven by Node.js tooling, so install a Node.js LTS release first. Note that the Node.js running inside your app is the one embedded in Electron; the Node.js on your machine is used to install packages and run build tools.

node -v
npm -v

If both commands print a version, you are ready. If you ever need to compile native modules, you may also need the C++ build tools for Visual Studio on Windows or the Xcode Command Line Tools on macOS.

Build one by hand

Building a project manually once is the best way to see how the pieces fit together. Create a folder, generate a package.json, and install electron.

mkdir my-electron-app
cd my-electron-app
npm init -y
npm install --save-dev electron

Install electron as a dev dependency. Packaging tools bundle the Electron binary into your finished app themselves, so it does not belong among the runtime dependencies.

Next, point the main field of package.json at your entry file and add a start script. Running electron . reads the package.json in the current folder and launches the file named in main as the main process.

{
  "name": "my-electron-app",
  "version": "1.0.0",
  "main": "main.js",
  "scripts": {
    "start": "electron ."
  }
}

Now write the main process in main.js. Once the app is ready (app.whenReady()), it creates a window and loads an HTML file.

const { app, BrowserWindow } = require('electron')

function createWindow() {
  const win = new BrowserWindow({ width: 800, height: 600 })
  win.loadFile('index.html')
}

app.whenReady().then(() => {
  createWindow()

  // macOS: recreate a window when the dock icon is clicked and none are open
  app.on('activate', () => {
    if (BrowserWindow.getAllWindows().length === 0) createWindow()
  })
})

// Quit when all windows are closed, except on macOS
app.on('window-all-closed', () => {
  if (process.platform !== 'darwin') app.quit()
})

The index.html shown in the window is an ordinary web page. Adding a Content Security Policy from day one keeps unexpected scripts from running.

<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self'" />
    <title>Hello Electron</title>
  </head>
  <body>
    <h1>Hello from Electron</h1>
  </body>
</html>
この章について質問がありますか?
次の章Project Structure

Run npm start and a desktop window opens with your page.

Scaffold with Electron Forge

For real projects, start with Electron Forge. It ties together scaffolding, running in development, packaging, building installers, and publishing under a single set of commands.

npm init electron-app@latest my-app
cd my-app
npm start

# A template with TypeScript and Vite
npm init electron-app@latest my-ts-app -- --template=vite-typescript

Available templates include webpack, webpack-typescript, vite, and vite-typescript. To add Forge to an existing project, install @electron-forge/cli and run npx electron-forge import.

Editor setup and debugging

Visual Studio Code is a solid choice thanks to its TypeScript support. The renderer (your web page) is debugged with the Chromium DevTools: open them from the View menu of the default application menu, or call win.webContents.openDevTools() in code.

The main process is plain Node.js code, so use a Node.js debugger. In VS Code, add this configuration to .vscode/launch.json and press F5.

{
  "version": "0.2.0",
  "configurations": [
    {
      "name": "Debug Main Process",
      "type": "node",
      "request": "launch",
      "cwd": "${workspaceFolder}",
      "runtimeExecutable": "${workspaceFolder}/node_modules/.bin/electron",
      "windows": {
        "runtimeExecutable": "${workspaceFolder}/node_modules/.bin/electron.cmd"
      },
      "args": ["."],
      "outputCapture": "std"
    }
  ]
}

From the command line you can run npx electron --inspect=5858 . and attach from chrome://inspect in Chrome. For quick API experiments without a project, try Electron Fiddle, the official playground.

Summary

  • Electron is an npm package installed as a dev dependency.
  • The main field of package.json names the main process entry file, and electron . runs it.
  • The main process creates a BrowserWindow, loads HTML, and follows each platform's quit conventions.
  • Start real projects with npm init electron-app@latest to get an Electron Forge setup.
  • Debug the renderer with DevTools and the main process with --inspect or the VS Code debugger.

コメント 0件

人気のコメント順新しい順

ログイン · ログインするとコメントできます。