edi9999 / jsqrcode

[deprecated] Lazarsoft's jsqrcode as a node module, object oriented, and with tests
Apache License 2.0
278 stars 63 forks source link

Add HTML example, add webpack build step, optimize existing build steps #16

Closed backflip closed 8 years ago

backflip commented 8 years ago

Hey Edgar, thanks a lot for this fork!

Would you consider adding this very basic browser example? While preparing it, I took the liberty of adding an additional Gulp taks using webpack to generate a build for the browser. This should make it easier for many users to generate the browser build since they don't have to globally install browserify, e.g.

Additionally, I have added npm scripts triggering the gulp tasks and "localized" some variables which ended up polluting the global scope.

backflip commented 8 years ago

Demo: https://qrcode-reader-eftpscijbb.now.sh/examples/browser-upload/

edi9999 commented 8 years ago

Hi, thanks for submitting this PR.

One thing doesn't seem totally ok :

The compile script shouldn't be triggered on post install, but rather on prepublish.

backflip commented 8 years ago

Ah, so would you want to publish the compiled scripts, too? Sounds good to me.

edi9999 commented 8 years ago

Yes

backflip commented 8 years ago

Okay, I have updated the package.json and README.md accordingly. In addition, I have created a .npmignore. It corresponds to .gitignore but does not contain dist/so npm can publish it (without an .npmignore it would apparently use the .gitignore file)

edi9999 commented 8 years ago

Merged, Thanks a lot for contributing ! I'm publishing npm version 0.1.1