![](/img/trans.png)
[英]How to publish yarn workspace with root package.json dependencies?
[英]Dependencies on scoped package vs yarn
我已經創建了包含內容的作用域包@scope/eslint-config
{
"name": "@scope/eslint-config",
"version": "1.0.3",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git"
},
"author": "",
"license": "ISC",
"dependencies": {
"babel-eslint": "8.2.5",
"eslint": "5.1.0",
"eslint-config-airbnb": "17.0.0",
"eslint-config-prettier": "2.9.0",
"eslint-plugin-css-modules": "2.7.5",
"eslint-plugin-flowtype": "2.50.0",
"eslint-plugin-import": "2.13.0",
"eslint-plugin-jsx-a11y": "6.1.0",
"eslint-plugin-prettier": "2.6.2",
"eslint-plugin-react": "7.10.0",
"eslint-plugin-require-jsdoc-except": "1.1.0"
}
}
並在我的項目中將其添加為"@scoped/eslint-config": "1.0.2",
但是,在運行yarn install
我只能看到該軟件包,而沒有任何依賴性。 但是它可以與npm一起使用
我已經嘗試過yarn
v1.8.0
, v1.7.0
和v1.6.0
你遇到麻煩了嗎? 有什么辦法嗎?
在npm中,由於使用flattern結構,因此可以工作。
對於紗線,您需要說- --flat
但這會帶來其他麻煩
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.