Javascript 开发环境

1. Overview

fnm/electron/nextjs Windows WSL Container
开发环境(VS Code with Extension)

2. Windows

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# 安装
# https://github.com/Schniz/fnm?tab=readme-ov-file#installation
winget install -e --id Schniz.fnm
# or using cargo if you have rust installed
# cargo install fnm

# 配置
fnm env --use-on-cd --shell powershell | Out-String | Invoke-Expression

# 更新 $PROFILE
Add-Content -Path $PROFILE -Value @'
# fnm
fnm env --use-on-cd --shell powershell | Out-String | Invoke-Expression

'@

# 安装 node
fnm use --install-if-missing 22

# 设置 npm 源
npm config set registry https://registry.npmmirror.com

# 设置 electron 源
Add-Content -Path $PROFILE -Value @'
# electron
$env:ELECTRON_MIRROR = "https://npmmirror.com/mirrors/electron/"

'@

3. Container

参考 项目模板next

作者

Michael Ding

发布于

2024-11-06

更新于

2024-11-06

许可协议