This repository has been archived by the owner on Nov 16, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update readme Update package.json
- Loading branch information
gallenhu
committed
Jul 5, 2016
1 parent
5086d72
commit 96ab2aa
Showing
3 changed files
with
11 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,67 +1,4 @@ | ||
# Open Browser Webpack Plugin | ||
Opens a new browser tab when Webpack loads. Very useful if you're lazy and don't want to force yourself to open a new tab when Webpack is ready to play! | ||
# Open Browser Webpack Express Plugin | ||
Base on [Open Browser Webpack Plugin](https://github.com/baldore/open-browser-webpack-plugin). | ||
|
||
## Usage | ||
|
||
Simply require the plugin and add it in the **plugins** section: | ||
|
||
```javascript | ||
var OpenBrowserPlugin = require('open-browser-webpack-plugin'); | ||
|
||
module.exports = { | ||
entry: path.resolve(__dirname, 'lib/entry.js'), | ||
output: { | ||
path: __dirname + "/bundle/", | ||
filename: "bundle.js" | ||
}, | ||
plugins: [ | ||
new OpenBrowserPlugin({ url: 'http://localhost:3000' }) | ||
] | ||
}; | ||
``` | ||
|
||
## Options | ||
|
||
#### url | ||
|
||
Type: `String`<br> | ||
Default: `http://localhost:8080` | ||
|
||
Url to open when Webpack is ready. Needs to have the prefix `http://` or `https://` in order to open the browser. | ||
|
||
#### browser | ||
|
||
Type: `String`<br> | ||
Optional | ||
|
||
Browser to open. By default, it will try to open the browser set by default in your system. | ||
|
||
#### ignoreErrors | ||
|
||
Type: `String`<br> | ||
Default: `False`<br> | ||
Optional | ||
|
||
By default this plugin only opens the browser if there's no Webpack errors. Setting ignoreErrors to true will open a new tab no matter the compilation errors. | ||
|
||
## Change Log | ||
|
||
### 0.0.2 - 2015-12-26 | ||
#### Added | ||
- ignoreErrors option (Thanks to @zhura). | ||
- Changelog. | ||
- Documentation for options. | ||
|
||
#### Removed | ||
- DEFAULT_BROWSER constant. | ||
|
||
### 0.0.1 - 2015-09-12 | ||
- First release. | ||
|
||
## TODO | ||
|
||
- [ ] Add tests. | ||
|
||
## License | ||
|
||
MIT License. | ||
Adapt Node Express Proxy by Opening Browser Async. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters