npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

ng-mural-jsdoc

v0.2.1

Published

JsDoc Plugin and Template for Angular

Downloads

6

Readme

ng-mural-jsdoc

JSDoc 3 Template for AngularJS; customized for the Mural app. A JSDoc plugin and template for AngularJS, nothing else.

Features

  • Common Template TOC, table of contents, for navigation by Directives, Services, Controllers, etc
  • Read and process @ngdoc tag

Read More about JS-Doc and Ng-Doc

AngularJS specific ngdoc directives

In addition to the standard jsdoc directives, there are a number that are specific to the Angular code-base:

  • @ngdoc - specifies the type of thing being documented. See below for more detail.
  • @scope - specifies that the documented directive will create a new scope
  • @priority - specifies the documented directive's priority
  • @animations - specifies the animations that the documented directive supports
  • @restrict - specifies how directives should be shown in the usage section. For example, for [E]lement, [A]ttribute, and [C]lass, use @restrict ECA
  • @methodOf type - links a method to the object/service where it is defined
  • @propertyOf type - links a property to the object/service where it is defined
  • @eventOf type - links a method to the object/service where it is defined
  • @eventType emit|broadcast - specifies whether the event is emitted or broadcast

The @ngdoc Directive

This directive helps to specify the template used to render the item being documented. For instance, a directive would have different properties to a filter and so would be documented differently. The commonly used types are:

  • overview - Give an overview of the file/module being documented
  • interface - Describe the interface of an object or service, specified by the @name directive. (abstract: use @object or @service instead)
  • service - Describe an AngularJS service, such as $compile or $http, for instance.
  • object - Describe a well defined object (often exposed as a service)
  • function - Describe a function that will be available to other methods (such as a helper function within the ng module)
  • method - Describe a method on an object/service
  • property - Describe a property on an object/service
  • event - Describe an AngularJS event that will propagate through the $scope tree.
  • directive - Describe an AngularJS directive
  • filter - Describe an AngularJS filter
  • inputType - Describe a specific type of AngularJS input directive (such as text, email or checkbox)
  • error - Describe a minErr error message

Usage Examples

/**
 * @ngdoc directive
 * @name NAME OF MODULE
 * @memberof NAME OF PARENT
 * @ctrl NAME OF CONTROLLER (if one)
 *
 * @classdesc
 *
 * @summary
 *   SUMMARY HERE
 *
 *   Restrict To:
 *     Element
 *
 * @example
 * Usage:
 *   NEED HTML EXAMPLE HERE
 *
 *
 * @requires {@Link LINKED NAME} 
 *
 * @param {LINK TO MOCKED OBJECT} PARAM NAME - PARAM DESCRIPTION.
 */

Install

$ npm install jsdoc ng-mural-jsdoc --save-dev

Run with grunt

  1. add the following to the gulpfile.json

     module.exports = function (grunt) {
         'use strict';
        
         require('load-grunt-tasks')(grunt);
         grunt.loadNpmTasks('ng-mural-styleguide');
        
         //Initializing Grunt Configuration
         grunt.initConfig({
             //  Read in the Package File
             cfg: grunt.file.readJSON('config.json'),
             jsdoc: {
                 dist: {
                     jsdoc: '/usr/local/bin/jsdoc',
                     src: [
                         'js/angular-apps/common/**/*.js',
                         '!js/angular-apps/_mural/_assets/bower_components/**',
                         './node_modules/ng-mural-jsdoc/Readme.md'
                     ],
                     options: {
                         destination: '<%= cfg.jsdoc.dest %>',
                         configure: './node_modules/ng-mural-jsdoc/conf.json',
                         template: './node_modules/ng-mural-jsdoc/template'
                     }
                 }
             }
         });
  2. run grunt task
    $ gulp jsdocs

Run with gulp

  1. run gulp task
    `$ gulp Mural`
    NOTE: This assume you have the full Mural app installed already