Skip to content

Commit

Permalink
Fix api docs generation
Browse files Browse the repository at this point in the history
  • Loading branch information
mikejolley authored and claudiosanches committed Feb 2, 2018
1 parent 3a20e6b commit 453ca39
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 43 deletions.
10 changes: 5 additions & 5 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -247,9 +247,9 @@ module.exports = function( grunt ) {
stdout: true,
stderr: true
},
apigen: {
apidocs: {
command: [
'apigen generate -q',
'vendor/bin/apigen generate -q',
'cd apigen',
'php hook-docs.php'
].join( '&&' )
Expand All @@ -267,7 +267,7 @@ module.exports = function( grunt ) {

// Clean the directory.
clean: {
apigen: {
apidocs: {
src: [ 'wc-apidocs' ]
}
},
Expand Down Expand Up @@ -351,8 +351,8 @@ module.exports = function( grunt ) {
]);

grunt.registerTask( 'docs', [
'clean:apigen',
'shell:apigen'
'clean:apidocs',
'shell:apidocs'
]);

// Only an alias to 'default' task.
Expand Down
41 changes: 4 additions & 37 deletions apigen.neon
Original file line number Diff line number Diff line change
@@ -1,53 +1,20 @@
source: ./

destination: wc-apidocs

templateConfig: apigen/theme-woocommerce/config.neon

# list of scanned file extensions (e.g. php5, phpt...)
extensions: [php]

# directories and files matching this file mask will not be parsed
source:
- woocommerce.php
- includes
exclude:
- includes/libraries/
- includes/api/legacy/
- i18n/
- node_modules/
- wc-apidocs/
- tmp/
- tests/
- .sass-cache/
- apigen/

# character set of source files; if you use only one across your files, we recommend you name it
charset: [UTF-8]

# elements with this name prefix will be considered as the "main project" (the rest will be considered as libraries)
main: WC

# title of generated documentation
title: WooCommerce 3.0.x Code Reference

# base url used for sitemap (useful for public doc)
title: WooCommerce Code Reference
baseUrl: https://docs.woocommerce.com/wc-apidocs/

# choose ApiGen template theme
templateTheme: default

# generate documentation for PHP internal classes
php: false

# generate highlighted source code for elements
sourceCode: true

# generate tree view of classes, interfaces, traits and exceptions
tree: true

# generate documentation for deprecated elements
deprecated: true

# generate list of tasks with @ todo annotation
todo: true

# add link to ZIP archive of documentation
download: false
6 changes: 5 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
"homepage": "https://woocommerce.com/",
"type": "wordpress-plugin",
"license": "GPL-3.0-or-later",
"prefer-stable": true,
"minimum-stability": "dev",
"require": {
"composer/installers": "~1.2"
},
Expand All @@ -14,7 +16,9 @@
"woocommerce/woocommerce-git-hooks": "*",
"woocommerce/woocommerce-sniffs": "*",
"wimg/php-compatibility": "^8.0",
"dealerdirect/phpcodesniffer-composer-installer": "^0.4.3"
"dealerdirect/phpcodesniffer-composer-installer": "^0.4.3",
"apigen/apigen": "^4",
"nette/utils": "~2.3.0"
},
"scripts": {
"pre-update-cmd": [
Expand Down

0 comments on commit 453ca39

Please sign in to comment.