Skip to content
Permalink
Browse files

Fix api docs generation

  • Loading branch information...
mikejolley authored and claudiosanches committed Feb 2, 2018
1 parent 3a20e6b commit 453ca3907e33e718d6c48575cdfe84c91936435c
Showing with 14 additions and 43 deletions.
  1. +5 −5 Gruntfile.js
  2. +4 −37 apigen.neon
  3. +5 −1 composer.json
@@ -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( '&&' )
@@ -267,7 +267,7 @@ module.exports = function( grunt ) {

// Clean the directory.
clean: {
apigen: {
apidocs: {
src: [ 'wc-apidocs' ]
}
},
@@ -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.
@@ -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
@@ -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"
},
@@ -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": [

0 comments on commit 453ca39

Please sign in to comment.
You can’t perform that action at this time.