-
-
Notifications
You must be signed in to change notification settings - Fork 276
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
package.json: Add chrome-open
script
#247
package.json: Add chrome-open
script
#247
Conversation
Like the `firefox-open` script, this builds and loads the extension into an isolated instance of Chrome, using [chrome-launch]. This has a couple of benefits: 1. New developers can get up-and-running faster 2. It's easier to test Chrome without any other user settings One caveat so far is that Chrome opens in the background rather than the foreground, but this is alleviated by printing a message out informing the developer. [chrome-launch]: https://github.com/hughsk/chrome-launch
@@ -48,6 +49,7 @@ | |||
"babel-loader": "6.2.10", | |||
"babel-plugin-transform-object-rest-spread": "6.20.2", | |||
"babel-preset-es2015": "6.18.0", | |||
"chrome-launch": "1.1.4", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about declaring chrome-launch
as an optionalDependencies along with web-ext
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, I'm not sure if this is a good idea. I tried two different ways of doing it:
-
Move those packages from
devDependencies
tooptionalDependencies
. However, due to the shrinkwrap, this results in those packages not getting installed at all. Here's a commit where I tried it, with more details in the message: josephfrazier@8e18566
EDIT: This also breaks the build: https://travis-ci.org/josephfrazier/browser-extension/builds/190786758#L516 -
Just add those packages to
optionalDependencies
, while keeping them indevDependencies
and npm-shrinkwrap.json. I'm not sure if this accomplishes anything or even makes sense, given Optional devDependencies? npm/npm#3870. It doesn't seem to break the install/chrome-open workflow, for what it's worth. Here's the test commit: josephfrazier@95b6e66
What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahhh I wasn't aware of the issue with the shrinkwrap. Declaring the dependencies twice doesn't sound right either. Let's continue with the good old way 😉
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome, thanks for merging!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one tiny suggestion other than that looks good.
Like the
firefox-open
script, this builds and loads the extension intoan isolated instance of Chrome, using chrome-launch. This has a couple
of benefits:
One caveat so far is that Chrome opens in the background rather than the
foreground, but this is alleviated by printing a message out informing
the developer.
EDIT: Disregard the AppVeyor failure. It's flakiness we've seen before: #115 (comment)