QuantumMechanics / NEM-sdk

NEM Developer Kit for Node.js and the browser
MIT License
137 stars 82 forks source link

Request: minified version #6

Closed Xpedite closed 7 years ago

Xpedite commented 7 years ago

I love the SDK :+1: but can we also get a minified js file in the dist folder please ?

Keep up the good work !

evias commented 7 years ago

+1, what about this @QuantumMechanics : https://github.com/babel/babili with this one we might be able to integrate the minifying right into the package.json. Using gulp would also work (see NanoWallet) but needs more configuration i'm sure.

Following is a working example of babili integration (i just tested on nem-sdk package, out of 2.4 Mb dist/nem-sdk.js, it produces a 1.3 Mb dist/nem-sdk.min.js) - i'm still looking for other implementations and maybe QM's opinion but here is the quick fix that would work with babili:

image

Other suggestions appreciated of course! :)

QuantumMechanics commented 7 years ago

Hi,

Hmm I am a bit worried about this issue: https://github.com/babel/babili/issues/485

Using uglifyJS directly on the browserified file should be good for now I guess

evias commented 7 years ago

uglify-js dependency added in https://github.com/QuantumMechanics/NEM-sdk/pull/7 and versioning process updated to, @QuantumMechanics you would only need to npm version 1.0.1-RC4 && npm publish after merge

@Xpedite : maybe before QM merges the PR, you want to test the minified file? If you wish you can fork my fork and you will be able to run "npm run minify" to have the minified JS: https://github.com/evias/NEM-sdk

Xpedite commented 7 years ago

Sorry guys, I lost track of this. I guess it can be closed now since #7 has been merged.

evias commented 7 years ago

yep you can now run npm minify :+1: