Skip to content

1. Use Config Make Plugin More Intelligent

tangcent edited this page Aug 10, 2019 · 2 revisions

Setting In IDE

  • Preferences(Settings) > Other Settings > EasyApi

Local config file

First step

  • add .easy.api.config in the root of project

How to set rules?

custom rules

simple example

Module

set rule of module to tell plugin how to group api
e.g.
simple rule:

module=#module

js rule:

module=js:it.doc("module")

the plugin will try to read @module from comment of class like this

/**
 * @module awesome_module
 */

Ignore

set rule of method to tell plugin not export it
e.g.
simple rule:

ignore=#ignore

js rule:

ignore=js:it.hasDoc("ignore")

the plugin will ignore methods that comment by @ignore like this:

/**
 * some comment of method(api)
 * @ignore
 */