woocommerce/plugins/woocommerce-admin/bin/hook-reference
Paul Sealock e41441f83e Add hook reference generator README and documentation (https://github.com/woocommerce/woocommerce-admin/pull/8004)
* Add hook reference README

* update hook reference

* better

* changelog

* add pr number

* remove example

* add desc

* add stats

* jsdoc REPORTS_FILTER

* Category configs

* configs

* data

* dashboard

* dashboard charts

* save

* save

* save

* done with filters

* Add scope to slotFill docs

* data

* add all slotfills

* data

* Fix error when scope is not present, and make use of typedef imports

* Move chart and filter jsdoc definitions to the reports index file

* Update hook reference data.json

* Make use of import for filter typedef and address some typos

Co-authored-by: Lourens Schep <lourensschep@gmail.com>
2022-02-11 10:38:38 -04:00
..
README.md Add hook reference generator README and documentation (https://github.com/woocommerce/woocommerce-admin/pull/8004) 2022-02-11 10:38:38 -04:00
data.js Add hook reference generator README and documentation (https://github.com/woocommerce/woocommerce-admin/pull/8004) 2022-02-11 10:38:38 -04:00
data.json Add hook reference generator README and documentation (https://github.com/woocommerce/woocommerce-admin/pull/8004) 2022-02-11 10:38:38 -04:00
index.js Hook reference: Add SlotFill support (https://github.com/woocommerce/woocommerce-admin/pull/6833) 2021-07-09 11:01:43 +12:00

README.md

Hook Reference Generator

Compile a publishable JSON object of WooCommerce's JavaScript filters and slotFill entry points.

Usage

Generate a new reference found at bin/hook-reference/data.json by running the following command.

npm run create-hook-reference

The data includes references to code in the Github repository by commit hash, so it is essential to commit the resulting data in a pull request to main so code references are publicly available.

DocBlock Requirements

JavaScript documentation blocks require certain fields in order to be included in the reference.

Filter

Tag Description
@filter Filter string used as addFilter's first argument

SlotFill

Tag Description
@slotFill The fill component's name