kaue / jsonexport

{} → :page_facing_up: it's easy to convert JSON to CSV

Home Page:http://kaue.github.io/jsonexport/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Make more compatible for browser use. Pass TypeScript checks

AckerApple opened this issue · comments

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

commented

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

Please check out my push when you get a chance.

Commit link here

Change log


  • v2.2.0 - Better browser distribution
    • Browser based files in dist are overwritten for best browser building
    • Found unused code and removed
    • Updated all depencies
      • Some had minor version changes
      • This package now changes its minor from 2.1 to 2.2
      • Added npm-run-all to safely run npm multi commands across all operating systems

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.

commented

@AckerApple go for it!

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

commented

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

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.

commented

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