thom4parisot / crx

A node.js command line app for packing Google Chrome extensions.
https://npmjs.com/crx
MIT License
516 stars 70 forks source link

I have a problem. The generated file is incomplete #119

Closed RavenCri closed 4 years ago

RavenCri commented 4 years ago

When I use node to run 'CRX = > CRX. Pack(); fs. WriteFile ("xpd",crxBuffer)', the content of the CRX file is not complete, but it is complete when I use the CMD command 'CRX pack - O xxx'. . I want to know how to solve it. I look forward to your reply.Thanks. Snipaste_2019-10-24_17-49-55 Snipaste_2019-10-24_17-46-27

ahwayakchih commented 4 years ago

You did not call crx.loadContents(), and i cannot see you setting up rootDirectory option anywhere.

Please check source of cli.js to see how ChromeExtension class can be used.

RavenCri commented 4 years ago

I solved the problem through your reply, sincere thanks