【发布时间】:2021-12-09 08:53:42
【问题描述】:
我想使用 Lib 本身为 GitHub 上的 JS Lib 编写一些文档。我创建了一个名为gh-pages 的空分支并开始构建文档页面。现在我需要使用我正在记录的 Lib 编写一些 Javascript,因为谁不会使用他们自己的库。我尝试通过npm install 安装它,但显然得到了这个错误:
npm ERR! code ENOSELF
npm ERR! Refusing to install package with name "package" under a package
npm ERR! also called "package". Did you name your project the same
npm ERR! as the dependency you're installing?
npm ERR!
npm ERR! For more information, see:
npm ERR! <https://docs.npmjs.com/cli/install#limitations-of-npms-install-algorithm>
那么我如何将我的代码库放入我的gh-pages-branch 而不从主分支复制它?我不想在两个不同的分支中维护相同的代码库。
【问题讨论】:
标签: npm github-pages conventions