diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 00000000..6060238c --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -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" + ] + } + } +} diff --git a/.gitignore b/.gitignore index 3a9bf87a..23bf60b3 100644 --- a/.gitignore +++ b/.gitignore @@ -8,6 +8,7 @@ dist # Node dependencies node_modules +.pnpm-store # Logs logs diff --git a/README.md b/README.md index 5ff8eafc..25e28da5 100644 --- a/README.md +++ b/README.md @@ -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