dolanmiu / docx

Easily generate and modify .docx files with JS/TS with a nice declarative API. Works for Node and on the Browser.
https://docx.js.org/
MIT License
4.22k stars 478 forks source link

Is this made to work on a browser? #83

Closed cristianocca closed 6 years ago

cristianocca commented 6 years ago

Only found Express references, but I'm wondering if this can work on a web browser. I read a browser exporter is in progress but is it currently possible to use it in a web browser and just get the binary output from the document ?

dolanmiu commented 6 years ago

Nope, it is not supposed to work in the browser because the dependency archiver is only supported in node

That is the single limiting factor

Karnith commented 6 years ago

Is it possible to use BrowserFS as a fill in replacement for grateful fs so this package could be used in browser? Then possibly docx library could use this for generating documents in the browser store for browser generation of files..

dolanmiu commented 6 years ago

I will look into it

it will require some work as archiver uses fs.

docx itself does not use fs

So I would need to kindly ask the archiver people, or use a different library