Created
October 5, 2012 04:56
-
-
Save harikt/3838179 to your computer and use it in GitHub Desktop.
A script to generate API of all aura packages with apigen
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // A script to generate API of all aura packages with apigen | |
| $path = __DIR__ . DIRECTORY_SEPARATOR; | |
| $package_path = $path . 'package'; | |
| $docs_path = $path . 'docs'; | |
| $dir = new DirectoryIterator( $package_path ); | |
| foreach ($dir as $fileinfo) { | |
| if (!$fileinfo->isDot()) { | |
| $dirname = $fileinfo->getFilename(); | |
| if ( $dirname == '.placeholder' ) { | |
| continue; | |
| } | |
| $generate[] = $dirname; | |
| } | |
| } | |
| foreach ($generate as $package ) { | |
| $destination = $docs_path . DIRECTORY_SEPARATOR . $package; | |
| $source = $package_path . DIRECTORY_SEPARATOR . $package . DIRECTORY_SEPARATOR . 'src'; | |
| passthru("apigen -s $source -d $destination "); | |
| } | |
| echo 'Done!' . PHP_EOL; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment