blockchainprojects / bitshares-ui

Graphical User Interface for BitShares Blockchain
https://wallet.bitshares.org
MIT License
0 stars 1 forks source link

#128 Removed charting_library sources #129

Closed Metizik closed 5 years ago

Metizik commented 5 years ago

General

Closes #128

  1. Created script (npm run package-charting-library) that archives the source code content of the charting_library folder into one file (content as it is right now, .zip or .tar or whatever is easiest, I don't want many additional dependencies, and all dependencies should be devDependencies) and writes the .md5 file for the archive
  2. Create script (npm run install-charting-library) that downloads the previously packaged file from an external URLhttps://bitshares.org/assets/charting_library.zip verifies the downloaded file against the .md5 file checksum unpacks it such that the charting_library folder is fully restored locally
  3. Deleted source code within the charting_library folder
  4. Added postinstall script to npm to set up charting library from remote assets

General

Please make sure the following is done:

Code Preparation

Please review all your changes one last time before committing

Testing

The branch has been tested on the following browsers (desktop and mobile view)

User interface changes

Delete this section if there weren't any UI changes. Please make sure you tested your changes in all themes

Please provide screenshots/licecap of your changes below

sschiessl-bcp commented 5 years ago

Can you please comment on the new dependencies and why they are needed

mettizik commented 5 years ago

@sschiessl-bcp , sure:

sschiessl-bcp commented 5 years ago

extract-zip is not able to also compress? Two dependencies seem over the top. Isn't there one (that is properly maintained) that can do both?

mettizik commented 5 years ago

extract-zip is not able to compress. Most relevant node modules related to ZIP compression are all splitted into zippers and unzippers separately, the only found alternative would be to use zlib module, but it requires much more logic with manual iterating over files, excluding files we want to skip and combining separate zipped files streams into single write stream there is an example of GZip https://medium.com/@harrietty/zipping-and-unzipping-files-with-nodejs-375d2750c5e4

Another possible implementation will be to use TAR and ZIP, but it does not match current assets/charting_library.zip format of archive

sschiessl-bcp commented 5 years ago

Thanks