jsusedocs-core

1.1.0 • Public • Published

JsUseDocs - core

A tool/library to parse and alter jsdocs in files with the intent on supporting JsDoc and JsDoc style comments on code. This is to feed a later project to develop a interactive GUI for jsdocs however can act as a stand alone, this however is a way to guarantee regular feature releases and updates

The idea is not just to make it easier to work with jsdocs but also to be able to make it easily expandable to support plugins and custom tags, for example to add react or electron specific comments. Adherence to jsdoc standards is not strictly promised.

Goals

  • To allow for tooling to integrate with jsdoc comments
  • To provide a flexible system to support multiple frameworks and js structures
  • To promote the use of clear understandable code

Is this a replacement for jsdoc?

No it can be used alongside standard jsdoc and has minimal feature overlap. This allows for interacting with jsdoc in js files programmatically as and when needed and not a way to compile it to a template

Common use cases

  • Adding to tests to check they are Doc'd correctly
  • Creating tools to automatically document a codebase
  • creating interactive tools to explore a codebase

What are you defining a doc as?

So in an aim to support all things we are in danger of just returning just a whole document. our rules are to be(loosely) :

  • all docs start with /*_ and end in _/
  • the line below the doc is the thing being documented (function, variable etc)
  • All parameters/tags are formatted between @tagname {variableA} variable description and @tagname description

These are preliminary rules for development please feel free to suggest more. I haven't really checked them against jsdoc either so I am certain to find edge cases but as time goes on it is hoped we can refine these rules to remain flexible but prevent the library returning junk.

Package Sidebar

Install

npm i jsusedocs-core

Weekly Downloads

1

Version

1.1.0

License

Apache-2.0

Unpacked Size

91.5 kB

Total Files

38

Last publish

Collaborators

  • ewrdad