如何从 GitHub 存储库导入组件
How can I import a component from GitHub repository
到目前为止我做了什么
步骤 1.纱线添加 githubURL
第 2 步。
"comet-chat-repo": "https://github.com/Vivek/cometChatRepo.git",
以上文件已添加到 package.json
第 3 步。尝试从 GitHub 存储库导入组件
从 'comet-chat-repo' 导入 { CometChatGroupListWithMessages };
Module not found: Can't resolve 'comet-chat-repo' in 'C:\Users
npm install git://github.com/username/repo.git#branch-name
yarn add git://github.com/username/repo.git#branch-name
// Example
yarn add git://github.com/denvash/react-pagination-example.git#master
然后根据repo路径导入,例如:
import Pagination from 'react-pagination/src/components/Pagination.react'
到目前为止我做了什么
步骤 1.纱线添加 githubURL
第 2 步。 "comet-chat-repo": "https://github.com/Vivek/cometChatRepo.git",
以上文件已添加到 package.json
第 3 步。尝试从 GitHub 存储库导入组件
从 'comet-chat-repo' 导入 { CometChatGroupListWithMessages };
Module not found: Can't resolve 'comet-chat-repo' in 'C:\Users
npm install git://github.com/username/repo.git#branch-name
yarn add git://github.com/username/repo.git#branch-name
// Example
yarn add git://github.com/denvash/react-pagination-example.git#master
然后根据repo路径导入,例如:
import Pagination from 'react-pagination/src/components/Pagination.react'