🎉💻我 2020 年的全新开发设置(VS Code,Windows 10)

2025-05-25

🎉💻我 2020 年的全新开发设置(VS Code,Windows 10)

新的一年🎉🥳 新的设置💻👩‍💻

💻笔记本电脑

我用的是 Razer Blade 15 2018 版。它有 16GB 的内存,这对于我这个开发者来说是必不可少的。我至少要打开 3 到 4 个浏览器,并打开大量的标签页。运行大量扩展程序的 Visual Studio Code 很快就会变得非常卡。Blade 还配备了防眩光显示屏。这是我对 MacBook 唯一不明白的地方。在阳光下,它就像一面镜子,除了你自己什么也看不见🤷‍♀️。

现在的问题是,你需要这么贵的笔记本电脑吗?不!现在,500欧元/美元就能买到性能超强的笔记本电脑。只要选择搭载锐龙 5 或 7 处理器的 AMD 处理器就行。如果你不想打开太多标签页,8GB 内存也足够了。

让我们开始设置我们的新笔记本电脑。

🖼 Windows 10 设置

我做的第一件事就是安装一个干净版本的 Windows 10。也许你很幸运,你会得到一个没有过多臃肿软件的 Windows 10 🥳。

现在连接到互联网并将 Windows 更新到最新版本。启用集成的防病毒和防火墙。它们现在很可靠,通常已经足够了。

🐌 Windows 10 慢速通道

如果 WSL2 已发布到稳定的 Windows 中,您可以跳过此部分!

  • 打开Windows 10设置(新界面)

  • 点击“更新和安全”

  • 点击左侧的“Windows Insider 计划”。

  • 加入内部计划并选择推荐的慢速(铃声)

  • 让 Windows 10 再次更新。

它看起来应该是这样的:

替代文本

为什么我们在慢速环?为了使用 WSL2!🐱‍💻

🍨 安装 scoop

Scoop是 Windows 的命令行安装程序。它可以通过命令行以最少的麻烦来安装程序。

安装起来非常容易。

打开电源外壳

iwr -useb get.scoop.sh | iex
Enter fullscreen mode Exit fullscreen mode

现在您只需输入:

scoop
Enter fullscreen mode Exit fullscreen mode

如果您现在看到包含许多命令的手册页,则表明它已成功安装。

Scoop 附带buckets。Buckets 是可安装应用程序或字体的集合。

我们需要添加 2 个额外的桶。

scoop bucket add extras

scoop bucket add nerd-fonts
Enter fullscreen mode Exit fullscreen mode

我们需要更新 buckets。我们这样做:

scoop update
Enter fullscreen mode Exit fullscreen mode

👩‍🏫 安装新软件

我们终于可以开始安装新软件,甚至无需打开 IE。

让我们从 7-Zip 和 Git 开始。这些是使用 scoop 安装其他工具所必需的。

scoop install git 7zip
Enter fullscreen mode Exit fullscreen mode

现在 Firefox 和 Google Chrome

scoop install googlechrome googlechrome-canary firefox firefox-nightly
Enter fullscreen mode Exit fullscreen mode

另外,我喜欢新的 Windows 终端。

scoop install windows-terminal
Enter fullscreen mode Exit fullscreen mode

下一个 Visual Studio Code 和 Visual Studio Code Insiders

sccop install vscode vscode-insiders
Enter fullscreen mode Exit fullscreen mode

我也喜欢 Insomnia。Insomnia 是一个 REST 客户端

scoop install insomnia
Enter fullscreen mode Exit fullscreen mode

VLC 也是你通常需要的

scoop install vlc
Enter fullscreen mode Exit fullscreen mode

现在就够了!

您可以使用以下方式检查已安装的应用程序

scoop list
Enter fullscreen mode Exit fullscreen mode

如果你想检查哪些应用程序已过期,你可以运行以下命令

scoop update

scoop status
Enter fullscreen mode Exit fullscreen mode

如果你想更新多个应用程序,你可以简单地运行

scoop update *
Enter fullscreen mode Exit fullscreen mode

请记住,这与 不同scoop update。您需要scoop update先运行才能更新应用程序。

🐧 安装 WSL2

让我们安装 WSL2!

打开 Windows 应用商店并搜索“Ubuntu”。截至撰写本文时,共有三个版本:Ubuntu、Ubuntu 18.04 LTS 和 Ubuntu 16.04 LTS。如果您知道没有限制,可以直接安装“Ubuntu”。

安装“Ubuntu”后,您可以打开 Windows 终端,在标签栏中点击向下箭头。点击“Ubuntu”,然后根据需要进行设置。现在,您的 Windows 计算机上应该已经运行着 Ubuntu!

替代文本

太棒了😁!

设置 Ubuntu/Linux

现在在打开的 Ubuntu 终端中输入以下命令。

首先,让我们更新 Ubuntu。

sudo apt update; sudo apt upgrade
Enter fullscreen mode Exit fullscreen mode

下一个 Docker!

sudo apt-get install docker docker-engine docker.io containerd runc
Enter fullscreen mode Exit fullscreen mode

现在我们已经安装了 docker,我们还需要启动服务!

sudo service docker start
Enter fullscreen mode Exit fullscreen mode

测试 Docker 是否正在运行

sudo docker run hello-world
Enter fullscreen mode Exit fullscreen mode

接下来是 nodejs 13.X(发布本文时的当前版本)

curl -sL https://deb.nodesource.com/setup_13.x | sudo -E bash -
sudo apt-get install -y nodejs
node --version
Enter fullscreen mode Exit fullscreen mode

我喜欢yarn而不是npm

curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -

echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list

sudo apt update && sudo apt install yarn
Enter fullscreen mode Exit fullscreen mode

由于gitUbuntu已经预装了,我们不需要再安装它,
只需要设置名称和E-Mail即可。

git config --global user.name "FIRST_NAME LAST_NAME"
git config --global user.email "MY_NAME@example.com"
Enter fullscreen mode Exit fullscreen mode

我们还需要生成 SSH 密钥

ssh-keygen
Enter fullscreen mode Exit fullscreen mode

👨‍💻Visual Studio代码

我发布了一个关于 Visual Studio Code 的小系列文章。你可以在这里
找到它。

从那时起我的设置就没有改变过。

结束

希望你喜欢它!

如果您喜欢这篇博文,请点赞;如果您真的很喜欢,我希望您在 dev.to 或以下任何社交媒体账户上关注我。👇👇👇

👋打个招呼! Instagram | Twitter | LinkedIn | Medium | Twitch | YouTube

文章来源:https://dev.to/lampewebdev/my-fresh-development-setup-for-2020-vs-code-windows-10-1hm0
PREV
💻我的 Web 开发 VS 代码设置、主题、扩展、提示和技巧
NEXT
是时候抛弃 ReactJS 或 Angular 并使用更好的 Web 标准(例如 Web 组件)了😍 第 1 部分