Giter Club home page Giter Club logo

javascript-documentation-examples's Introduction

About

JavaScript (and its family) has no standard tool for documentation and there are many tools with different perspective. This is a collection of working node.js projects demonstrating best practices of complex semantics in such tools.

Success experiments

A list of expeiments that IMO demonstrate best practices for documentation

TypeDoc tutorial

TypeDoc is a great tool but with very poor documentation, this is my attempt to solve that: TypeDoc Tutorial

events-002

Demonstrate best practices for documenting events, after some failures, I concluded that I needed a typedoc plugin for accomplish the perfect representation of events. So I implemented as-member-of type-doc plugin and declaring events as separate functions. The following tutorial explains with detail:

Failed experiments

The following are the examples generated that I consider failures this is , they are non-satisfactory experiments or demonstrate tools limitations.

events-001 (failed)

Several (failed) experiments trying to document events with typedoc, particularly subclasses of node.js EventEmitter.

events-noEventEmitter (failed)

Similar example as events-001 Nothing special here. But completly indepdent of EventEmitter and declaring a righ class hierarchy of Listeners, EventSources, etc. Best practices for documenting events, particularly subclasses of node.js EventEmitter

Install and generate all the docs

yarn 
yarn run-all doc

Note with yarn run-all X you run X command in all yarn workspaces

Concepts and technologies

Some concepts that are hard to document (I'm learning and discussing best practices in this project) :

  • Events EventEmitters and EventListeners particularly best practices for descibing complex hierarchies.

Some technologies:

  • jsdoc (and templates)
  • typedoc (and templates)
  • short-jsdoc
  • JavaScript
  • TypeScript
  • Flow

TODO: things I don't know how to do, yet

typedoc

  • "this method trigger the event foo of that class". can do it in jsdoc but not in typedoc

  • // TODO: IDEA: what if we biuld a event emitter with generics that doesn't // extends node event emitter but just delegate the methods to a property???

javascript-documentation-examples's People

Contributors

cancerberosgx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

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.