Giter Site home page Giter Site logo

hegemonic / jsdoc-baseline Goto Github PK

View Code? Open in Web Editor NEW
61.0 5.0 32.0 4.18 MB

An experimental, extensible template for JSDoc.

License: Other

JavaScript 84.72% CSS 0.44% Nunjucks 11.90% SCSS 2.93%
baseline jsdoc javascript api docs documentation template

jsdoc-baseline's People

Contributors

bcoe avatar dependabot[bot] avatar hegemonic avatar jmdobry avatar jonathankingston avatar justinbeckwith avatar renovate-bot avatar renovate[bot] avatar theasta avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

jsdoc-baseline's Issues

Tests!

  • Add test framework (including Istanbul)
  • Add unit tests for JS code
  • Figure out how to test Swig templates
  • Write template tests

Improved handling of overloaded constructors

Right now, if a class has an overloaded constructor, I think we show all of the page content once per variation in symbol.swig. That's not so great.

One way to handle this:

  1. Assume all the variations (contained in docs) have the same members.
  2. Coalesce the header info for all the variations.
  3. Show the members for the first variation.

This isn't perfect, but it should handle most use cases.

Are there other times when we're likely to pass more than one item in the docs array? If so, need to handle those too.

Option to display callbacks/typedefs alongside method parameters

If you're using the @callback or @typedef tag, there are times when you might want to show the type info near (or inline with) the places where you use those type definitions.

As a starting point, this will probably just be a global, on-or-off toggle, but try to think about finer-grained ways to do this. (For example: Based on how many times it's used? Based on whether you're looking at the same page where the type is documented? Based on some new tag?)

Create gulp task to auto-upgrade a customized version of the template

For each file, at a minimum:

  • Check "last updated" version
  • Warn about anything that can't be auto-upgraded because it's missing the "last version" annotation
  • Warn about anything that can't be auto-upgraded because it's been customized

Questions:

  • How to track template delta between versions? How do we know what to upgrade from version 0.x to 0.y?
  • Okay to upgrade from 0.x to 0.y by doing all the stepwise upgrades in between? Or is there a better way?

Module-page bugs

These all happen if you have something like module.exports = 2;:

  • Description doesn't show up
  • No type info when module.exports is not a function/constructor
  • "Defined in" appears twice

Should check these for functions, too. Also, check for other issues that were fixed in jsdoc/jsdoc@8c66aef.

Use namespace for helper functions?

Do we need to use a namespace for all the helper functions, so things aren't clobbered if someone has a method called log or what have you?

Need to investigate and implement if necessary.

Improve the gulpfile

  • Build compiled versions of the Swig templates
  • Add a default task
  • Consider adding a task to copy static files to an existing output directory

Add optional div tags all over the place

That way people don't have to customize the template just to get a few extra <div> tags for CSS purposes.

I could implement this by adding a new Swig tag, like so:

{% container 'class1' 'class2' %}
  <p>whatever</p>
{% endcontainer %}

And a config file like:

{ "class1": true, "class2": false }

In that case, I guess we'd create a <div> with just class1. If both were false, no <div>.

(Also: Maybe a {% span %} tag?)

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.