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

feat(options): add multiple openPage support #2266

Merged

Conversation

digitaljohn
Copy link
Contributor

  • This is a bugfix
  • This is a feature
  • This is a code refactor
  • This is a test update
  • This is a docs update
  • This is a metadata update

For Bugs and Features; did you add new tests?

Yes and added an example.

Motivation / Use-Case

Closes issue #2265

Breaking Changes

No breaking changes

Additional Info

Added the ability to specify multiple windows to open using the existing openPage option. An array can now be set in the devServer Webpack config object or if using the --open-page CLI option a comma-delimited-list can be specified.

Please note regular strings still function correctly. No Breaking Changes.

API:

devServer: {
  openPage: ['example1.html', 'example2.html'],
},

CLI:

npm run webpack-dev-server -- --open-page example1.html,example2.html

@jsf-clabot
Copy link

jsf-clabot commented Sep 30, 2019

CLA assistant check
All committers have signed the CLA.

Copy link
Member

@alexander-akait alexander-akait left a comment

Choose a reason for hiding this comment

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

Good job, some notes

test/server/utils/runOpen.test.js Show resolved Hide resolved
examples/cli/open-page/README.md Show resolved Hide resolved
@alexander-akait
Copy link
Member

Also please accept CLA

@codecov
Copy link

codecov bot commented Sep 30, 2019

Codecov Report

Merging #2266 into master will increase coverage by 0.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2266      +/-   ##
==========================================
+ Coverage    93.9%   93.92%   +0.01%     
==========================================
  Files          34       34              
  Lines        1280     1283       +3     
  Branches      368      369       +1     
==========================================
+ Hits         1202     1205       +3     
  Misses         71       71              
  Partials        7        7
Impacted Files Coverage Δ
lib/utils/runOpen.js 100% <100%> (ø) ⬆️
lib/utils/createConfig.js 96.46% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 98aa8e1...1886814. Read the comment docs.

@digitaljohn digitaljohn changed the title Feature/multiple openpage feat(options): add multiple openPage support Oct 1, 2019
alexander-akait
alexander-akait previously approved these changes Oct 1, 2019
Copy link
Member

@alexander-akait alexander-akait left a comment

Choose a reason for hiding this comment

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

examples/cli/open-page/README.md Show resolved Hide resolved
lib/options.json Show resolved Hide resolved
lib/utils/runOpen.js Outdated Show resolved Hide resolved
Copy link
Member

@alexander-akait alexander-akait left a comment

Choose a reason for hiding this comment

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

One note and we can merge

lib/utils/runOpen.js Outdated Show resolved Hide resolved
Copy link
Member

@alexander-akait alexander-akait left a comment

Choose a reason for hiding this comment

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

Great

/cc @hiroppy @Loonride

Copy link
Member

@hiroppy hiroppy left a comment

Choose a reason for hiding this comment

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

Thanks!

@digitaljohn
Copy link
Contributor Author

@hiroppy @evilebottnawi any ideas on the failing tests?

@alexander-akait
Copy link
Member

@digitaljohn sometimes chromeless failed on windows due unknown reason, so CI failed, don't worry

@alexander-akait alexander-akait merged commit c9e9178 into webpack:master Oct 7, 2019
digitaljohn pushed a commit to signal-noise/webpack-dev-server that referenced this pull request Oct 7, 2019
@alexander-akait alexander-akait mentioned this pull request Oct 22, 2019
2 tasks
@digitaljohn digitaljohn deleted the feature/multiple-openpage branch October 23, 2019 00:03
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.

6 participants