Open vivek1729 opened 8 years ago
Hi @vivek1729
The Chrome API's are available in a Chrome packaged app, based on the permissions requested by the manifest.json https://github.com/hybridgroup/cylon-example-chrome/blob/master/manifest.json#L15 and then granted by the user during the installation.
Regarding the auto-handling of the serialport, that is actually handled by browser-serialport https://github.com/garrows/browser-serialport when executing within a Chrome app.
So as you already surmised, you modify your script.js, then use browserfy to build your browser.js file, then use that file to build your Chrome app.
Hope that helps!
Absolutely love the work you guys are doing and I firmly believe that javascript is the way to go with everything. I want to make a Chrome App using cylon.js and therefore stumbled upon this repo from this blog post. Looking through the README, it's documented that we have to write our code in the
script.js
file for instance and bundle it using Browserify like so:While this makes sense to me, after going through
browser.js
file which is inculded by default inindex.html
, I notice that there are chrome specific serial API's used there supporting the chrome runtime. Does, Browserify accomplish it by default? I doubt.So, if I want to modify
script.js
to support different device having different code, how do I bundle it successfully utilizing the Chrome API's or how do I usebrowser.js
to build the bundled js file otherwise?