Commit f9c3fc6
committed
feature #550 Clean up the public API file and improve a few other things (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 |
|--------|-------|
|  |  |
* In VSCode (note that the leading whitespaces and asterisk are caused by this bug: microsoft/TypeScript#23517)
| Before | After |
|--------|-------|
|  |  |
* Indicates that `Encore.getWebpackConfig()` returns a Webpack configuration, which allows IDEs' autocompletion to work on it:

Commits
-------
8531000 Clean up the public API file and improve a few other thingsFile tree
42 files changed
+600
-402
lines changed- bin
- lib
- config
- friendly-errors
- formatters
- loaders
- plugins
- utils
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
42 files changed
+600
-402
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
| 43 | + | |
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| |||
0 commit comments