Giter Site home page Giter Site logo

Comments (5)

thlorenz avatar thlorenz commented on August 24, 2024

Not sure if that ever worked then since I cannot recall taking an extra param for module name.
Good catch. The module name would be something like fs.

You can see a use case in replpad.

Would you mind digging into this and submitting a PR with a fix?
I'm not sure what your use case is, but you could use that as a start for a repro case/test.

Thanks.

from doctoc.

mklement0 avatar mklement0 commented on August 24, 2024

I'm not sure how/if my use case is related to the --nodejs option.

My use case is that I want the TOC links in my read-me files to work as document-internal links when the files are rendered on http://npmjs.com - instead of pointing back to GitHub, which I've seen happen once, though I don't understand how it happened.

Does anything even need to be done to the read-me files in order to support this?

To fix the issue at hand:

  • I need to fully understand the purpose of the --nodejs option.
  • Where would the module name be taken from in the case of doctoc? The npm package name (as defined in package.json)? The main value from package.json? Note that CLI-only packages have no such entry.

from doctoc.

thlorenz avatar thlorenz commented on August 24, 2024

Ok so that's not what the --nodejs option is for.

Please give me a usecase (sample npmjs.org) repo where links are still pointing to wrong location.
I've seen this before as well, but npmjs.org fixed that since.

from doctoc.

mklement0 avatar mklement0 commented on August 24, 2024

The only time I saw it was late last year when I tried to publish an npm package.
I removed the TOC shortly after to avoid the problem, so I can't point you to an instance of the problem - and from what you're saying it sounds like it (a) was an npmjs.com problem to begin with which (b) has now been fixed.
So, personally, I'm all set, thanks - and I suggest that someone who's familiar with --nodejs take on the fix.

from doctoc.

thlorenz avatar thlorenz commented on August 24, 2024

OK, closing for now. Most likely I'll just remove --nodejs from the README since it makes no sense for TOCs on pages anyhow.

from doctoc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.