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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Polling for Bash on Windows #302

Merged
merged 2 commits into from Nov 28, 2016
Merged

Add Polling for Bash on Windows #302

merged 2 commits into from Nov 28, 2016

Conversation

IanMitchell
Copy link
Contributor

Per an official source, reading the /proc/version file and searching for 'Microsoft' is currently the best way to detect if a user is running Bash on Windows. I wrote a small package that checks to see if the user is on Linux and Bash, and if they are will read that file to check if it's a Windows environment. If it is, I add polling to the webpack dev server.

First time doing something like this, so if I've gone about this the wrong way completely a course adjustment would be much appreciated 馃槃

Fixes #166

Copy link
Contributor

@arunoda arunoda left a comment

Choose a reason for hiding this comment

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

You have also uses some ES2015 features(arrow functions, const) in your package. See.

This may cause issues if the user is using an older node. (before v4).
@nkzawa do we need to support any older node versions?
If not, this is not an issue.

@IanMitchell anyway, writing your package in ES5 is pretty trivial as well :)

@@ -1,6 +1,7 @@
import { join, relative, sep } from 'path'
import webpackDevMiddleware from 'webpack-dev-middleware'
import webpackHotMiddleware from 'webpack-hot-middleware'
import isWindowsBash from 'is-windows-bash'
Copy link
Contributor

Choose a reason for hiding this comment

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

You need to add is-windows-bash to the package.json

Copy link
Contributor

Choose a reason for hiding this comment

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

We use absolute versions, so use that. I mean versions like 0.8.1 not ^0.8.1

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 whoops, totally forgot to check that in. Will update my package to support ES5 as well.
EDIT: Done, published ES5 changes and using that.

Copy link
Contributor

Choose a reason for hiding this comment

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

Awesome.

@rauchg rauchg merged commit 7a66870 into vercel:master Nov 28, 2016
@rauchg
Copy link
Member

rauchg commented Nov 28, 2016

Really neat stuff. Thank you

@lock lock bot locked as resolved and limited conversation to collaborators Jan 19, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants