jgm / djot.js

JavaScript implementation of djot
MIT License
141 stars 15 forks source link

Add docstrings #53

Open bdarcus opened 1 year ago

bdarcus commented 1 year ago

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
jgm commented 1 year ago

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

bdarcus commented 1 year ago

Seems there is:

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

jgm commented 1 year ago

Care to make a PR?

bdarcus commented 1 year ago

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

bdarcus commented 1 year ago

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 ...

jgm commented 1 year ago

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