Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds run command -> install and launch extension #90

Merged
merged 1 commit into from
Mar 2, 2016

Conversation

kumar303
Copy link
Contributor

@kumar303 kumar303 commented Mar 1, 2016

Fixes #6

@kumar303
Copy link
Contributor Author

kumar303 commented Mar 2, 2016

This pattern of adding adapter.js to the tests is something that will go away in #87 . It was just a hack.

@rpl
Copy link
Member

rpl commented Mar 2, 2016

@kumar303 I think that we need to add to the cli a new "--firefox-bin" option (as a non mandatory option), because the firefox binary auto-discovery sometimes fails to find the correct path to the firefox executable (e.g. on my ubuntu it decides that the binary should be /usr/lib64/firefox, which doesn't even exist on my system)

let readStream = nodeFs.createReadStream(extensionPath);
let id = manifestData.applications.gecko.id;

// TODO: also support copying a direcotry of code to this
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit, typo: direcotry -> directory

@kumar303
Copy link
Contributor Author

kumar303 commented Mar 2, 2016

I think that we need to add to the cli a new "--firefox-bin" option

Yep, adding that in #71

@@ -37,6 +37,8 @@
"babel-polyfill": "6.6.1",
"es6-error": "2.0.2",
"es6-promisify": "3.0.0",
"firefox-profile": "^0.3.11",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kumar303 This should be turned into an exact version match

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

d'oh! Good catch.

});

firefox.stderr.on('data', (data) => {
console.log(`stdout: ${data.toString().trim()}`);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kumar303 shouldn't this be stderr? (e.g. console.log(stderr: ...);)

why not using console.error here to route these messages to the stderr?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh yeah, heh, good catch. I also plan to fix up all the logging in #33

@rpl
Copy link
Member

rpl commented Mar 2, 2016

@kumar303 great! this PR looks ready.

I'm so happy that I can now run a webextension addon without leaving the command line :-)

@kumar303
Copy link
Contributor Author

kumar303 commented Mar 2, 2016

Thanks for the review! Yes, definitely let me know how it works for you. There are, of course, a lot of missing features (a lot of issues filed).

kumar303 added a commit that referenced this pull request Mar 2, 2016
Adds run command -> install and launch extension
@kumar303 kumar303 merged commit 3ff9498 into mozilla:master Mar 2, 2016
@kumar303 kumar303 deleted the run-cmd branch March 2, 2016 17:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants