Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature #550 Clean up the public API file and improve a few other thi…
…ngs (Lyrkan) This PR was squashed before being merged into the master branch (closes #550). Discussion ---------- Clean up the public API file and improve a few other things Now that we don't have many active PRs anymore I figured it was a good time to do some spring cleaning, especially in the `index.js` file (since we often recommend users to look at its content). This PR: * Moves the proxy creation into its own file (`lib/EncoreProxy.js`) * Moves the content of `initializeWebpackConfig(...)` inside of the `WebpackConfig`'s constructor (we already had some checks related to the `RuntimeConfig` there anyway) * Fixes a few JSDoc issues (missing or misplaced comments, types not resolving correctly, etc.) * Puts examples from the `index.js` file's comments inside of Markdown code-blocks, which are supported by at least PHPStorm and VSCode: * In PHPStorm | Before | After | |--------|-------| | ![image](https://user-images.githubusercontent.com/850046/55289907-ac42bf00-53cc-11e9-9aeb-33cde4bec1f9.png) | ![image](https://user-images.githubusercontent.com/850046/55289910-b2d13680-53cc-11e9-8275-605017b2018d.png) | * In VSCode (note that the leading whitespaces and asterisk are caused by this bug: microsoft/TypeScript#23517) | Before | After | |--------|-------| | ![image](https://user-images.githubusercontent.com/850046/55289926-e4e29880-53cc-11e9-84d3-9b8a27cc33cc.png) | ![image](https://user-images.githubusercontent.com/850046/55289929-eca23d00-53cc-11e9-84cd-d8cf5082a2e9.png) | * Indicates that `Encore.getWebpackConfig()` returns a Webpack configuration, which allows IDEs' autocompletion to work on it: ![image](https://user-images.githubusercontent.com/850046/55289982-aa2d3000-53cd-11e9-8abd-2c5179ec289c.png) Commits ------- 8531000 Clean up the public API file and improve a few other things
- Loading branch information