Skip to content

Commit

Permalink
chore: add devcontainer (#642)
Browse files Browse the repository at this point in the history
* chore: add devcontainer

* Update README.md
  • Loading branch information
qwerzl authored Nov 11, 2024
1 parent 4350e53 commit 848e559
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/typescript-node
{
"name": "Enspire Dev",
"image": "mcr.microsoft.com/devcontainers/typescript-node:latest",

"mounts": [
// Share npm configuration with the host.
"source=${localEnv:HOME}${localEnv:USERPROFILE}/.npmrc,target=/home/node/.npmrc,type=bind,consistency=cached"
],

"postCreateCommand": "pnpm i",

"customizations": {
"vscode": {
"extensions": [
// Required extensions
"Vue.volar",
"bradlc.vscode-tailwindcss",
"dbaeumer.vscode-eslint",
"Nuxtr.nuxtr-vscode",
"Prisma.prisma",
// Do not install Prettier. It will conflict with eslint.
"-esbenp.prettier-vscode"
]
}
}
}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ dist

# Node dependencies
node_modules
.pnpm-store

# Logs
logs
Expand Down
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ Enspire 的目标很简单,**Make CAS life easier for everyone**

## 本地运行

### (可选) VSCode用户:设置Devcontainer
1. F1调出Command Palette,选择`Dev Containers: Clone Repository in Container Volume...`
2. 输入`https://github.com/computerization/enspire`
> 不建议`Reopen in Container`,Bind Mounted Volume会导致严重的IO性能问题。
### 安装依赖

```bash
Expand Down

0 comments on commit 848e559

Please sign in to comment.