Skip to content

Commit

Permalink
Code: コメントを良い感じにする
Browse files Browse the repository at this point in the history
  • Loading branch information
sevenc-nanashi committed Nov 19, 2024
1 parent f4dc92e commit 8207e3c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/helpers/path.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as windowsPath from "@std/path/windows";
import * as posixPath from "@std/path/posix";
import { isWindows } from "./platform";

// OSにあったパス操作関数をエクスポートする
// 判定したOSにあったパス操作関数をエクスポートする
// NOTE: @std/pathのWindows判定は差し替えられないので、ここで判定する
const path = isWindows ? windowsPath : posixPath;

Expand Down
4 changes: 4 additions & 0 deletions src/helpers/platform.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/**
* コードが動いている環境を判定するためのユーティリティ。
* Electronのメインプロセス、レンダラープロセス、ブラウザのどこでも使用可能。
*/
export const isProduction = import.meta.env.MODE === "production";
export const isElectron = import.meta.env.VITE_TARGET === "electron";
export const isBrowser = import.meta.env.VITE_TARGET === "browser";
Expand Down

0 comments on commit 8207e3c

Please sign in to comment.