kohheepeace / mr-pdf

Generate PDF for document website.
https://www.npmjs.com/package/mr-pdf
MIT License
125 stars 41 forks source link

Add VuePress v1/v2 with demo #45

Closed mrdrivingduck closed 2 years ago

mrdrivingduck commented 2 years ago

Hi there. I found this tool very useful to me. Thanks for your contribution!

I have fixed some issues in example command during my usage of this tool with VuePress. As far as I know, VuePress has come up with v2 similiar to Docusaurus, so I add the demo of VuePress 2 (vuepress-next). Hope you like it.

Also, is it possible to upgrade the NPM dependencies since some of them are deprecated? Since I'm not sure about the compability, I didn't update the package.json.

$ ncu
Using yarn
Checking /home/mrdrivingduck/mr-pdf/package.json
[====================] 15/15 100%

 chalk                               ^3.0.0  →    ^5.0.0     
 commander                           ^4.1.1  →    ^9.0.0     
 puppeteer                           ^2.1.1  →   ^13.3.1     
 @tsconfig/node14                    ^1.0.0  →    ^1.0.1     
 @types/node                        ^15.6.1  →  ^17.0.17     
 @types/puppeteer                    ^2.0.1  →    ^5.4.4     
 @typescript-eslint/eslint-plugin    ^3.9.0  →   ^5.11.0     
 @typescript-eslint/parser           ^3.9.0  →   ^5.11.0     
 eslint                              ^7.7.0  →    ^8.9.0     
 eslint-config-prettier             ^6.11.0  →    ^8.3.0     
 eslint-plugin-prettier              ^3.1.4  →    ^4.0.0     
 husky                               ^4.2.5  →    ^7.0.4     
 lint-staged                       ^10.2.11  →   ^12.3.3     
 prettier                             2.0.5  →     2.5.1     
 typescript                          ^3.8.3  →    ^4.5.5     

Run ncu -u to upgrade package.json
kohheepeace commented 2 years ago

Hi @mrdrivingduck really thanks for this PR 👍

Also, is it possible to upgrade the NPM dependencies since some of them are deprecated? Since I'm not sure about the compability, I didn't update the package.json.

=> Yes it is possible. But I think I need to write a test to make sure that the PDF is generated correctly for each dependencies version upgrade.

For example this issue https://github.com/kohheepeace/mr-pdf/issues/25 is caused by different node version. So, just upgrading automatically may cause problems.

👇-----side note------👇 I think it is better to use fixed version of npm package. (=> not ^17.0.17 but 17.0.17), after reading this article about the strategy of managing dependencies.