@egomobile/documentation
TypeScript icon, indicating that this package has built-in type declarations

0.7.2 • Public • Published

npm last build PRs Welcome

@egomobile/documentation

Tools for documenting (TypeScript) code.

Install

Execute the following command from your project folder, where your package.json file is stored:

npm install --save @egomobile/documentation

Usage

import {
    defaultDependencies,
    DependsOn,
    functionDependsOn
} from "@egomobile/documentation";

@DependsOn({
  // an unique ID of the "remote" app that
  // has a dependency on this class
  app: "id-of-my-app",

  // optional remarks for this app
  remarks: "Changes made by this class will update entities in this app",

  // list of entities that are
  // affected in `app`
  entities: [
    {
      // an unique ID of the entity in `app`
      // like the name of a database table
      // or collection
      key: "tdta_user",

      // optional remarks for this entity
      remarks: "Changes made by this class will update this entity",

      // list of entities that are
      // affected in that entity
      attributes: [
        {
          // an unique ID of the attribute
          // inside the entity in like the name of
          // column
          key: "email",

          // optional remarks for this entity attribute
          remarks: "Changes made by this class will update this attribute",
        },
      ],
    },
  ],
})
class MyDocumentedClass {
    // you can also save information
    // about a property
    @DependsOn({ ... })
    public aProp: any;

    // you can also save information
    // about a method
    @DependsOn({ ... })
    public aMethod(
        // you can also save information
        // about a method parameter
        @DependsOn({ ... }) aParam: any
    ) {
        // ...
    }
}

function myFunction() {
  // ...
}
// do this for functions as well
functionDependsOn(myFunction);

console.log(
    // by default all information are
    // stored in this module-wide array
    defaultDependencies
);

Documentation

The API documentation can be found here.

Package Sidebar

Install

npm i @egomobile/documentation

Weekly Downloads

5

Version

0.7.2

License

LGPL-3.0

Unpacked Size

64.3 kB

Total Files

24

Last publish

Collaborators

  • ekmobile
  • egodux
  • mkloubertego
  • mkloubert
  • ekegodigital