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

litly

v1.1.8

Published

Doc generator for Parse.

Downloads

5

Readme

Litly - Documentation Generator for Parse Platform Server.

Litly is a library designed to help you quickly document your backend using Parse. Its use is simple and fast, in a few minutes it is possible to document your cloud functions and cloud jobs.

Installation

Installing the NPM Module.

 $ npm install litly

Starting

In the index.js of your project, import or require the Litly module:

const Litly = require("litly");
or;
import Litly from "Litly";

So just start Litly using your express instance, like below.

const app = express(); // Your express instance.
Litly.init(app, "Your project/app name");

After that, you can access Litly's address /litly-doc. Example: http://localhost:1337/litly-doc

Litly Annotation Tags

These are the annotations currently available for use with Litly. | Tag | Description | |--|--| | @cloud_function| Sets that this is a Cloud Function | | @cloud_job| Sets that this is a Cloud Job | | @litly_start | Sets the start of a Litly document | | @litly_end | Sets the end of a Litly document | | @name | Sets the name of the document | | @group | Sets the group of the document | | @description| Sets the description of the document | | @param| Sets the param of the document | | @response| Sets the response of the document | | @use_next_line| Sets if Litly should consider the next line | | @parse_class| Sets if a param is a Parse Class Object | | @run_every| Sets the interval that a Cloud Job is running |

Examples of use

Documenting a Cloud Function without params

/**
 * @litly_start
 * @cloud_function
 *
 * @name
 * someCloudFunction
 *
 * @description
 * @use_next_line Returns a list of integers.
 * Using two lines description with @use_next_line
 *
 * @response
 * Array<Int>
 *
 * @litly_end
 */
Parse.Cloud.define("someCloudFunction", async () => {
  return [1, 2, 3];
});

Documenting a Cloud Function with params

/**
 * @litly_start
 * @cloud_function
 *
 * @name
 * someCloudFunction
 *
 * @description
 * Returns a list of integers.
 *
 * @param
 * userId: string - User ID from the current User.
 * @param
 * Cat: @parse_class Cat
 *
 * @response
 * {
 *   "user": "user"
 * }
 *
 * @litly_end
 */
Parse.Cloud.define("someCloudFunction", async () => {
  return { user };
});

Documenting Cloud Functions with grouping (1.1.7 >=)

/**
 * @litly_start
 * @cloud_function
 *
 * @group
 * MyGroup
 *
 * @name
 * someCloudFunction
 *
 * @description
 * Returns a list of integers.
 *
 * @param
 * userId: string - User ID from the current User.
 * @param
 * Cat: @parse_class Cat
 *
 * @response
 * {
 *   "user": "user"
 * }
 *
 * @litly_end
 */
Parse.Cloud.define("someCloudFunction1", async () => {
  return { user };
});

/**
 * @litly_start
 * @cloud_function
 *
 * @group
 * MyGroup
 *
 * @name
 * someCloudFunction
 *
 * @description
 * Returns a list of integers.
 *
 * @param
 * userId: string - User ID from the current User.
 * @param
 * Cat: @parse_class Cat
 *
 * @response
 * {
 *   "user": "user"
 * }
 *
 * @litly_end
 */
Parse.Cloud.define("someCloudFunction2", async () => {
  return { user };
});

Documenting a Cloud Job

/**
 * @litly_start
 * @cloud_job
 *
 * @name
 * someCloudJob
 *
 * @description
 * Job description...
 *
 * @run_every
 * 1 minute
 *
 * @litly_end
 */
Parse.Cloud.job("someCloudJob", async () => {
  // ...
});

The interface

Acessing /litly-doc you can see your documented Cloud Functions and Cloud Jobs, like as in the image below.

enter image description here