kaue / jsonexport

{} → :page_facing_up: it's easy to convert JSON to CSV
http://kaue.github.io/jsonexport/
Apache License 2.0
247 stars 41 forks source link

Make more compatible for browser use. Pass TypeScript checks #51

Closed AckerApple closed 6 years ago

AckerApple commented 6 years ago

When compiling code for updated versions of TypeScript, it now checks the require statements and several errors are being thrown:

ERROR in ../node_modules/jsonexport/dist/core/join-rows.js
Module not found: Error: Can't resolve 'os'
ERROR in ../node_modules/jsonexport/dist/parser/csv.js
Module not found: Error: Can't resolve 'os'
ERROR in ../node_modules/jsonexport/dist/core/stream.js
Module not found: Error: Can't resolve 'stream'
ERROR in ../node_modules/jsonexport/dist/parser/csv.js
Module not found: Error: Can't resolve 'stream'

It seems require('stream') and require('os') are not even really needed for the browser. The EOL can just be backslash "\n" in the browser. And stream is not needed if a callback is provided.

I manually edited the node_modules/jsonexport files and all came out well and built to browser. I will need to find the most compatible way to have all files live in harmony and that the dist folder has NO node based requires.

Will have to complete this with-in a weeks time at max. Please be available to publish to npm when I have completed

kaue commented 6 years ago

I will be avaliable for the publish, but i already added you as a collaborator so you should be able to publish also

AckerApple commented 6 years ago

Please check out my push when you get a chance.

Commit link here

Change log


AckerApple commented 6 years ago

I'm going to try and publish this code to npm. I feel real confident of it and in need of it for my team.

kaue commented 6 years ago

@AckerApple go for it!

AckerApple commented 6 years ago

Published. I really am humbled and extra appreciative of being entrusted to maintain and publish this package. Quite the honor.

kaue commented 6 years ago

@AckerApple I am honoured to have you helping maintaining this package! Really, thanks Acker!

AckerApple commented 6 years ago

Would be cool to cross your path someday. Your github icon is soulfully great to see, zoomed in to see you got a smile. Little things, the little things.

kaue commented 6 years ago

Yes, i want to meet you too! send me an email (check my gh profile) with your skype, whatsapp or telegram info =)