diff --git a/.npmrc b/.npmrc new file mode 100644 index 0000000000..c1da78ccf5 --- /dev/null +++ b/.npmrc @@ -0,0 +1,2 @@ +# 提升依赖项到根目录,以避免重复安装相同的包 +shamefully-hoist=true \ No newline at end of file diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 0000000000..0828ab7947 --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +v18 \ No newline at end of file diff --git a/package.json b/package.json index e1d3abd5ce..9b23024a88 100644 --- a/package.json +++ b/package.json @@ -65,7 +65,8 @@ "changelog": "node script/generate-changelog.js", "init:component": "node script/init-component", "robot": "publish-cli robot-msg", - "prepare": "husky install" + "prepare": "husky install", + "preinstall": "npx only-allow pnpm" }, "config": { "commitizen": { diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml new file mode 100644 index 0000000000..08f4a78ef1 --- /dev/null +++ b/pnpm-workspace.yaml @@ -0,0 +1,4 @@ +packages: + - 'packages/**' + - 'site' + - 'test' \ No newline at end of file