Closed djkramnik closed 3 years ago
@djkramnik Thanks for bringing this up. I must have overlooked something with the dependencies not being included in the final webgazer.js.
@RobinReborn Do you have a fix for this? I'm noticing that in commits before we merged #164, the www/webgazer.js file is not being pushed to the repo and is being built via githook / npm run build
, so I'm assuming that you added it back. Did you change the dependencies?
I'm not sure what the issue is or what djkramnik is trying to do.
npm run build will build tensorflow.js and webgazer.js and copy them into www/
tensorflow is a dependency in package.json (in root, not www/)
I'm not sure what the issue is or what djkramnik is trying to do.
npm run build will build tensorflow.js and webgazer.js and copy them into www/
tensorflow is a dependency in package.json (in root, not www/)
In the home page and the README, among other suggested methods of usage, it says you can just drop in the webgazer.js script on an html page. There is a download link as well. It gives the impression that it will work just by doing that, however I found that,you also need to include the tensorflow.js dep file. It's not a big deal but a bit misleading imo and could trip up some people. I created a PR for this here to update the documentation: https://github.com/brownhci/WebGazer/pull/208/files in case that helps.
@djkramnik Apologies for the delay. I've reverted the webgazer.js file to include the concatenated dependencies (including tensorflow) -- it'll be significantly larger, but shouldn't require that you import anything else: https://webgazer.cs.brown.edu/webgazer.js?
@RobinReborn Previously we had concatenated tfjs and the other dependencies into the dist/webgazer.js
and www/webgazer.js
files with the webpack.config.js
script, which allowed users to just use webgazer.js as a standalone, albeit clunky, file -- I think you may have separated the webpack into chunks at some point.
Since the standalone .js file was how most users were integrated WebGazer, I reverted it. But It might be worthwhile to include a build script for a separate webgazer.js file that doesn't include the dependencies (maybe wbgzr.js
? haha).
@xanderkoo OK - the reason that I separated tensorflow.js and webgazer.js was to compute code coverage. So your reversion will break calculating code coverage.
Your webpage: https://webgazer.cs.brown.edu/ instructs to just download and include the webgazer.js script on your webpage as an easy way to get it up and running. But it seems like you also need tensorflow.js. Maybe update the docs/webpage to indicate this? Including only webgazer.js on your page just doesn't work but its what is suggested in your docs/README everywhere.