openzipkin / zipkin-browser-extension

Chrome and Firefox browser extensions for Zipkin
Apache License 2.0
25 stars 13 forks source link

attempt at cross-browser build #7

Closed eirslett closed 8 years ago

eirslett commented 8 years ago

This is a huge change, basically a refactor of the whole plugin, but without any functional changes. The intention is to port the project so it works both in Chrome and Firefox.

Chrome has a WebExtensions standard for writing browser extensions. Firefox will eventually adopt that standard fully, and then we can use more or less the same codebase across all browsers. Until then, we need to abstract away implementation differences between the browsers.

codefromthecrypt commented 8 years ago

tested the chrome side, works fine!

marcingrzejszczak commented 8 years ago

For sure I've done sth wrong... I've cloned the repo, checked out feature/cross-browser. Installed npm.

marcin@marcin-N56JR:~/r/z/zipkin-chrome-extension(feature/cross-browser|…) $ npm --version                                                            
3.5.2

When I executed npm run dev-firefox I got:

marcin@marcin-N56JR:~/r/z/zipkin-chrome-extension(feature/cross-browser|✔) $ npm run dev-firefox                                                         17:10

> zipkin-browser-extension@0.0.0 dev-firefox /home/marcin/repo/zipkin-stuff/zipkin-chrome-extension
> node node_modules/gulp/bin/gulp.js firefox

[17:12:45] Using gulpfile ~/

repo/zipkin-stuff/zipkin-chrome-extension/gulpfile.js
[17:12:45] Starting 'firefox:webpack'...
[17:12:45] Starting 'firefox:mustache'...
[17:12:45] Starting 'firefox:data'...
[17:12:45] Finished 'firefox:mustache' after 470 ms
[17:12:46] Finished 'firefox:data' after 895 ms

stream.js:74
      throw er; // Unhandled stream error in pipe.
      ^
Error: ./js/ZipkinPanel.js
Module not found: Error: Cannot resolve 'file' or 'directory' ./ZipkinUI in /home/marcin/repo/zipkin-stuff/zipkin-chrome-extension/js
resolve file
  /home/marcin/repo/zipkin-stuff/zipkin-chrome-extension/js/ZipkinUI doesn't exist
  /home/marcin/repo/zipkin-stuff/zipkin-chrome-extension/js/ZipkinUI.webpack.js doesn't exist
  /home/marcin/repo/zipkin-stuff/zipkin-chrome-extension/js/ZipkinUI.web.js doesn't exist
  /home/marcin/repo/zipkin-stuff/zipkin-chrome-extension/js/ZipkinUI.js doesn't exist
  /home/marcin/repo/zipkin-stuff/zipkin-chrome-extension/js/ZipkinUI.json doesn't exist
resolve directory
  /home/marcin/repo/zipkin-stuff/zipkin-chrome-extension/js/ZipkinUI doesn't exist (directory default file)
  /home/marcin/repo/zipkin-stuff/zipkin-chrome-extension/js/ZipkinUI/package.json doesn't exist (directory description file)
[/home/marcin/repo/zipkin-stuff/zipkin-chrome-extension/js/ZipkinUI]
[/home/marcin/repo/zipkin-stuff/zipkin-chrome-extension/js/ZipkinUI.webpack.js]
[/home/marcin/repo/zipkin-stuff/zipkin-chrome-extension/js/ZipkinUI.web.js]
[/home/marcin/repo/zipkin-stuff/zipkin-chrome-extension/js/ZipkinUI.js]
[/home/marcin/repo/zipkin-stuff/zipkin-chrome-extension/js/ZipkinUI.json]
 @ ./js/ZipkinPanel.js 19:16-37

npm ERR! Linux 4.4.0-21-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "run" "dev-firefox"
npm ERR! node v4.2.6
npm ERR! npm  v3.5.2
npm ERR! code ELIFECYCLE
npm ERR! zipkin-browser-extension@0.0.0 dev-firefox: `node node_modules/gulp/bin/gulp.js firefox`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the zipkin-browser-extension@0.0.0 dev-firefox script 'node node_modules/gulp/bin/gulp.js firefox'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the zipkin-browser-extension package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node node_modules/gulp/bin/gulp.js firefox
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs zipkin-browser-extension
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls zipkin-browser-extension
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/marcin/repo/zipkin-stuff/zipkin-chrome-extension/npm-debug.log

Here is the log file: npm-debug.txt

eirslett commented 8 years ago

I found the issue!

eirslett commented 8 years ago

fixed it

marcingrzejszczak commented 8 years ago

I think I got it working for Firefox too :) Great job!

codefromthecrypt commented 8 years ago

lovely! should we rename the repo now? :)

eirslett commented 8 years ago

Yes, something like zipkin-browser-extension?

codefromthecrypt commented 8 years ago

going twice...

codefromthecrypt commented 8 years ago

sold!