I'd like to write some documentation for a JS Lib on GitHub, using the Lib itself. I created an empty branch called gh-pages
and started building the documentation pages. Now I need to write some Javascript using the Lib I'm documenting, because who wouldn't use their own Library. I tried installing it via npm install
but obviously got this error:
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>
So how do I get my codebase into my gh-pages
-branch without copying it from the master branch? I do not want to maintain the same codebase in two different branches.
For instance, I could just rename the package name property in my package.json
in the branch...