ericblade / quagga2

An advanced barcode-scanner written in Javascript and TypeScript - Continuation from https://github.com/serratus/quaggajs
MIT License
758 stars 85 forks source link

dist/quagga.min.js file gone #27

Closed Roko131 closed 5 years ago

Roko131 commented 5 years ago

Hi, I would like to use this project using the script tag as written in readme but the dist/quagga.min.js file is missing.

I am not familiar with NPM.

Maybe you have an updated version of the quagga.min.js I could use?

Thanks for continuing this project!

ericblade commented 5 years ago

Hello there! It doesn't really make sense to have the distribution files in the source repository, as npm is the preferred way of installing a working version, and having the distribution files in source makes for really cluttered change views.

Assuming you have node installed, you should be able to do npm install @ericblade/quagga2 from your application.. that section of the README might need a bit of an update, though. . . If you'd like to generate the files yourself from the repo, you can run npm run build which will generate the packages as well.

Either way should work, though I think we probably need to do some changes to README with regards to how to get it to work correctly in a modern browser using npm install . . . all of my projects are using webpack and such to install modules.. so .. yeah.. maybe some changes are needed.

ericblade commented 5 years ago

I just ran a quick check after doing npm install @ericblade/quagga2

<script src="./node_modules/@ericblade/quagga2/dist/quagga.min.js"></script> correctly loads quagga into global space as Quagga

of course you'd still need to include that file with whatever you're serving

Roko131 commented 5 years ago

Thanks! learned something new.

ericblade commented 5 years ago

how did you resolve?

Roko131 commented 5 years ago

As you suggested: npm install @ericblade/quagga2- which created ./node_modules/@ericblade/quagga2/dist/quagga.min.js which I then copied to my project.

I only use the quagga.min.js in my project- none of the other files created by npm install @ericblade/quagga2 btw I don't use webpack- I use the asset pipeline

ericblade commented 5 years ago

cool :) you could do the same with a copy of the repo and npm run build