nelson6e65 / phpdoc-vuepress

🎨 Template for generating your PHP API documentation in a pretty VuePress format
https://phpdoc-vuepress.netlify.app
MIT License
21 stars 2 forks source link

File not found at path: vuepress/.assets #33

Open dimaslanjaka opened 3 years ago

dimaslanjaka commented 3 years ago

Scopes

Describe the bug

Parsing files

Applying transformations (can take a while)
21:22:43 ERROR     [console] Error thrown while running command "-d="src/" -t="docs/php/" --template="vendor/nelson6e65/phpdoc-vuepress/data/templates/vuepress". Message: "File not found at path: vuepress/.assets" ["exception" => League\Flysystem\FileNotFoundException^ { …},"command" => "-d="src/" -t="docs/php/" --template="vendor/nelson6e65/phpdoc-vuepress/data/templates/vuepress"","message" => "File not found at path: vuepress/.assets"]

In Filesystem.php line 389:

  File not found at path: vuepress/.assets  

Steps to reproduce

phpdoc -d="src/" -t="docs/php/" --template="vendor/nelson6e65/phpdoc-vuepress/data/templates/vuepress"
nelson6e65 commented 3 years ago

Hi. Thanks for reporting.

Are you using a phar version of phpdoc?

What version are you using?

dimaslanjaka commented 3 years ago

Yes. i used phar phpdoc 3.0.0.

dimaslanjaka commented 3 years ago

https://github.com/dimaslanjaka/universal-framework/tree/master/libs/bin/phpdoc

this is my phpdoc

dimaslanjaka commented 3 years ago

phpdocumentor version ^2.9.1 as described on Doc not working as well.

image

nelson6e65 commented 3 years ago

I think you are using phpDocumentor 3. Sadly, at the moment, this template is not compatible with it.

Seems that you installed locally with composer, but still using phpDocumentor 3 executable. Try to run vendor/bin/phpdoc directly instead of simply phpdoc.

And yes, PHAR bins seems to fail to locate template files also. :(

You can try to build the documentation using GitHub Actions, for example the Build job in this workflow: https://github.com/nelson6e65/php_nml/blob/master/.github/workflows/documentation.yml#L47 (Is configured to use Netlify, but you can adapt it to GitHub pages or any other).

If you like to discard if there are some problems with your config, you can try to build the documentation of this repository:

# Clone and move to phpdoc-vuepress directory

# Install dependencies
composer install
npm install

# Build API with local phpDoc configured as composer script
composer build:api

# Run VuePress server
npm run docs:dev
nelson6e65 commented 3 years ago

If you have problems with building docs for this repository, following previous instructions, then there is some platform incompatibility (PHP version, mostly).

If you successfully build the project, then there are some issues with the global binary files you are using. Maybe duplicated phpdoc bin in different locations.

nelson6e65 commented 3 years ago

You can try using composer scripts, like this repo, if you installed phpDocumentor 2.9.1 in your local composer.json. With this, composer will look for local install at first.

dimaslanjaka commented 3 years ago

I've removed phpdoc phar 3.0.0 and install via composer v.2.9.0 and now render running properly, but exceeds 500kb ?

image

nelson6e65 commented 3 years ago

What do you mean with "exceeds 500Kb"?

dimaslanjaka commented 3 years ago

What do you mean with "exceeds 500Kb"?

i dont know, its mean too large md file.

dimaslanjaka commented 3 years ago

are this no alternative splitting classes.md when reached 500kb size ? seems like, splitting other php to classes1.md when classes.md reach 500kb and so on.

dimaslanjaka commented 3 years ago

when classes.md more than 500kb, vuepress cannot load all contents. result is blank on classes.md (http://localhost:8080/base-url/classes.html)

dimaslanjaka commented 3 years ago

i build phpdoc with limit classes. but when i build with vuepress build docs-src result error page like bellow description.

Config : https://github.com/dimaslanjaka/universal-framework/tree/master/docs-src Github Page : build with vuepress-phpdoc, on development mode vuepress dev docs-src working, but when build result like this: http://git.webmanajemen.com/universal-framework/ http://git.webmanajemen.com/universal-framework/php/

Static JSDoc with gulp-jsdoc3 into .vuepress/public/js (work) http://git.webmanajemen.com/universal-framework/js/

dimaslanjaka commented 3 years ago

image

now working like a charm. but i loses a lot function description and usages :(

nelson6e65 commented 3 years ago

@dimaslanjaka when classes.md more than 500kb, vuepress cannot load all contents. result is blank on classes.md (http://localhost:8080/base-url/classes.html)

Oh, I understand. You have too many classes, so the file is too large. Hmm...

Yes, I was thinking a way to split on multiple files some time ago, and I found some directions about it, but for my implementation for phpDocumentor 3.

At the moment I have not much time to invest in here. I'm sorry 😥. I will try to get more tome to invest in that implementation in the following weeks, because I also need PHP 7.4+ syntax compatibility for my current projects' documentation.

dimaslanjaka commented 3 years ago

I have idea. Create single file php to splitting the Larger markdowns. Then creating json config to output splitted md's. And referring json file to config.js.

I want to help, but i still confusing on how md marker to indicate next page or next definition class/method. Need split them to spread into multiple files

dimaslanjaka commented 3 years ago

Executing that single file php on cli faster than webserver. Can load file size 3mb++ less than 3 seconds on CLI.

nelson6e65 commented 3 years ago

Yes, the spitting was a challenge when I try to implement, but I noticed a feature in phpDocumentor 3 to allow split documentation in multiple files, 1 php --> 1 md, but the problem was linking files on VuePress menu and also linking between files on different files and type (global function, class, trait, interface, ...).

At the beginning, my intention was to build only 1 JSON file and start building from there. 1 Generic Vue component for Class, Trait, etc, but I was kind of difficult, and I ended up by using twig templates instead.

dimaslanjaka commented 3 years ago

https://github.com/fr3nch13/phpdoc-markdown i have try this. good result, but i dont know how to port it into vuepress.

Also compatible with phpdocumentor 3.0