djot.js icon indicating copy to clipboard operation
djot.js copied to clipboard

Add docstrings

Open bdarcus opened this issue 2 years ago • 7 comments

When you get a chance, it'd be nice to have tsdoc/jsdoc docstrings in the codebase :-)

Also:

❯ man djot
No manual entry for djot

bdarcus avatar May 12 '23 12:05 bdarcus

See doc/djot.1 for the man page. If there's a way to get npm to install this properly, let me know.

jgm avatar May 12 '23 15:05 jgm

Seems there is:

https://docs.npmjs.com/cli/v9/configuring-npm/package-json#man

bdarcus avatar May 12 '23 15:05 bdarcus

Care to make a PR?

jgm avatar May 13 '23 03:05 jgm

Hmm ... I just went to do that and realized the line is already there in the package.json, so it should work already.

bdarcus avatar May 13 '23 10:05 bdarcus

Did a little digging. It could have something to do with the fact I'm using pnpm, though I haven't come across anything to that effect.

Here's what its installation directory tree looks like. Seems it puts the man doc in doc; maybe that's it?

~/.local/share/pnpm/global/5/node_modules/@djot/djot
❯ tree
.
├── dist
│   └── djot.js
├── doc
│   └── djot.1
├── lib
│   ├── ast.js
│   ├── attributes.js
│   ├── block.js
│   ├── cli.js
│   ├── djot-renderer.js
│   ├── event.js
│   ├── filter.js
│   ├── find.js
│   ├── html.js
│   ├── index.js
│   ├── inline.js
│   ├── options.js
│   ├── pandoc.js
│   ├── parse.js
│   └── version.js
├── LICENSE
├── node_modules
├── package.json
├── README.md
└── types
    ├── ast.d.ts
    ├── attributes.d.ts
    ├── block.d.ts
    ├── cli.d.ts
    ├── djot-renderer.d.ts
    ├── event.d.ts
    ├── filter.d.ts
    ├── find.d.ts
    ├── html.d.ts
    ├── index.d.ts
    ├── inline.d.ts
    ├── options.d.ts
    ├── pandoc.d.ts
    ├── parse.d.ts
    └── version.d.ts

I'll dig a little more later ...

bdarcus avatar May 13 '23 14:05 bdarcus

You probably just need to adjust your MANPATH so that it looks in this directory.

jgm avatar May 20 '23 22:05 jgm