1
我需要在兩個Ember項目之間共享組件,但是可以在不生成和發佈節點包的情況下實現該組件?如何在多個Ember項目之間共享組件
我需要在兩個Ember項目之間共享組件,但是可以在不生成和發佈節點包的情況下實現該組件?如何在多個Ember項目之間共享組件
是的,有可能避免npm。您可以將代碼託管在Github或Bitbucket上或者任何基於git的系統上。
的Install命令是這樣
ember install git+ssh://[email protected]:path-to-git-repository.git
您也可以選擇引用特定犯這樣
ember install git+ssh://[email protected]:path-to-git-repository.git#commit-id
更新的package.json然後會是這個樣子
package.json
"devDependencies": {
"your-package-name": "git+ssh://[email protected]:path-to-git-repository.git",
}