Skip to content

Commit

Permalink
chore: improve desc
Browse files Browse the repository at this point in the history
  • Loading branch information
anshumanv committed Apr 6, 2021
1 parent ada09a2 commit 7c74b8a
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 23 deletions.
46 changes: 23 additions & 23 deletions lib/options.json
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@
"properties": {
"bonjour": {
"type": "boolean",
"description": "Broadcasts the server via ZeroConf networking on start."
"description": "Broadcasts the server via ZeroConf networking on start. https://webpack.js.org/configuration/dev-server/#devserverbonjour"
},
"client": {
"type": "object",
Expand Down Expand Up @@ -206,16 +206,16 @@
]
}
},
"description": "Specifies client properties.",
"description": "Specifies client properties. https://webpack.js.org/configuration/dev-server/#devserverclient",
"additionalProperties": false
},
"compress": {
"type": "boolean",
"description": "Enable gzip compression for everything served:"
"description": "Enable gzip compression for everything served. https://webpack.js.org/configuration/dev-server/#devservercompress"
},
"dev": {
"type": "object",
"description": "The bundled files will be available in the browser under this path."
"description": "The bundled files will be available in the browser under this path. https://webpack.js.org/configuration/dev-server/#devserverdev-"
},
"firewall": {
"anyOf": [
Expand All @@ -230,11 +230,11 @@
"minItems": 1
}
],
"description": "Defines routes which are enabled by default, on by default and allows localhost."
"description": "Defines routes which are enabled by default, on by default and allows localhost. https://webpack.js.org/configuration/dev-server/#devserverfirewall"
},
"headers": {
"type": "object",
"description": "Adds headers to all responses."
"description": "Adds headers to all responses. https://webpack.js.org/configuration/dev-server/#devserverheaders"
},
"historyApiFallback": {
"anyOf": [
Expand All @@ -245,7 +245,7 @@
"type": "object"
}
],
"description": "When using the HTML5 History API, the index.html page will likely have to be served in place of any 404 responses."
"description": "When using the HTML5 History API, the index.html page will likely have to be served in place of any 404 responses. https://webpack.js.org/configuration/dev-server/#devserverhistoryapifallback"
},
"host": {
"anyOf": [
Expand All @@ -256,7 +256,7 @@
"type": "null"
}
],
"description": "Specify a host to use. If you want your server to be accessible externally."
"description": "Specify a host to use. If you want your server to be accessible externally. https://webpack.js.org/configuration/dev-server/#devserverhost"
},
"hot": {
"anyOf": [
Expand All @@ -267,11 +267,11 @@
"enum": ["only"]
}
],
"description": "Enable webpack's Hot Module Replacement feature."
"description": "Enable webpack's Hot Module Replacement feature. https://webpack.js.org/configuration/dev-server/#devserverhot"
},
"http2": {
"type": "boolean",
"description": "Serve over HTTP/2 using spdy."
"description": "Serve over HTTP/2 using spdy. https://webpack.js.org/configuration/dev-server/#devserverhttp2"
},
"https": {
"anyOf": [
Expand Down Expand Up @@ -331,23 +331,23 @@
}
}
],
"description": "By default, dev-server will be served over HTTP. It can optionally be served over HTTP/2 with HTTPS."
"description": "By default, dev-server will be served over HTTP. It can optionally be served over HTTP/2 with HTTPS. https://webpack.js.org/configuration/dev-server/#devserverhttps"
},
"liveReload": {
"type": "boolean",
"description": "By default, the dev-server will reload/refresh the page when file changes are detected."
"description": "By default, the dev-server will reload/refresh the page when file changes are detected. https://webpack.js.org/configuration/dev-server/#devserverlivereload"
},
"onAfterSetupMiddleware": {
"instanceof": "Function",
"description": "Provides the ability to execute custom middleware after all other middleware internally within the server."
"description": "Provides the ability to execute custom middleware after all other middleware internally within the server. https://webpack.js.org/configuration/dev-server/#devserverafter"
},
"onBeforeSetupMiddleware": {
"instanceof": "Function",
"description": "Provides the ability to execute custom middleware prior to all other middleware internally within the server."
"description": "Provides the ability to execute custom middleware prior to all other middleware internally within the server. https://webpack.js.org/configuration/dev-server/#devserverbefore"
},
"onListening": {
"instanceof": "Function",
"description": "Provides an option to execute a custom function when webpack-dev-server starts listening for connections on a port."
"description": "Provides an option to execute a custom function when webpack-dev-server starts listening for connections on a port. https://webpack.js.org/configuration/dev-server/#onlistening"
},
"open": {
"anyOf": [
Expand Down Expand Up @@ -375,7 +375,7 @@
"minItems": 1
}
],
"description": "Tells dev-server to open the browser after server had been started. Set it to true to open your default browser."
"description": "Tells dev-server to open the browser after server had been started. Set it to true to open your default browser. https://webpack.js.org/configuration/dev-server/#devserveropen"
},
"port": {
"anyOf": [
Expand All @@ -389,7 +389,7 @@
"type": "null"
}
],
"description": "Specify a port number to listen for requests on."
"description": "Specify a port number to listen for requests on. https://webpack.js.org/configuration/dev-server/#devserverport"
},
"proxy": {
"anyOf": [
Expand All @@ -411,15 +411,15 @@
"minItems": 1
}
],
"description": "Proxying some URLs can be useful when you have a separate API backend development server and you want to send API requests on the same domain."
"description": "Proxying some URLs can be useful when you have a separate API backend development server and you want to send API requests on the same domain. https://webpack.js.org/configuration/dev-server/#devserverproxy"
},
"public": {
"type": "string",
"description": "When using inline mode and you're proxying dev-server, the inline client script does not always know where to connect to. It will try to guess the URL of the server based on window.location, but if that fails you'll need to use this."
"description": "When using inline mode and you're proxying dev-server, the inline client script does not always know where to connect to. It will try to guess the URL of the server based on window.location, but if that fails you'll need to use this. https://webpack.js.org/configuration/dev-server/#devserverpublic"
},
"setupExitSignals": {
"type": "boolean",
"description": "it takes a boolean and if true (default on CLI), the server will close and exit the process on SIGINT and SIGTERM."
"description": "It takes a boolean and if true (default on CLI), the server will close and exit the process on SIGINT and SIGTERM. https://webpack.js.org/configuration/dev-server/#devserversetupexitsignals"
},
"static": {
"anyOf": [
Expand Down Expand Up @@ -447,7 +447,7 @@
"minItems": 1
}
],
"description": "It is possible to configure advanced options for serving static files from contentBase. See the Express documentation for the possible options."
"description": "It is possible to configure advanced options for serving static files from contentBase. See the Express documentation for the possible options. https://webpack.js.org/configuration/dev-server/#devserverstatic"
},
"transportMode": {
"anyOf": [
Expand All @@ -474,7 +474,7 @@
"enum": ["sockjs", "ws"]
}
],
"description": "This option allows us either to choose the current devServer transport mode for client/server individually or to provide custom client/server implementation."
"description": "This option allows us either to choose the current devServer transport mode for client/server individually or to provide custom client/server implementation. https://webpack.js.org/configuration/dev-server/#devservertransportmode"
},
"watchFiles": {
"anyOf": [
Expand All @@ -498,7 +498,7 @@
}
}
],
"description": "List of files to watch for file changes and serve."
"description": "List of files to watch for file changes and serve. https://webpack.js.org/configuration/dev-server/#devserverwatchfiles"
}
},
"additionalProperties": false
Expand Down
2 changes: 2 additions & 0 deletions test/__snapshots__/Validation.test.js.snap.webpack4
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ exports[`Validation validation should fail validation for invalid \`hot\` config
"Invalid configuration object. Object has been initialized using a configuration object that does not match the API schema.
- configuration.hot should be one of these:
boolean | \\"only\\"
-> Enable webpack's Hot Module Replacement feature. https://webpack.js.org/configuration/dev-server/#devserverhot
Details:
* configuration.hot should be a boolean.
* configuration.hot should be \\"only\\"."
Expand Down Expand Up @@ -31,6 +32,7 @@ exports[`Validation validation should fail validation for invalid \`static\` con
"Invalid configuration object. Object has been initialized using a configuration object that does not match the API schema.
- configuration.static should be one of these:
boolean | non-empty string | object { directory?, staticOptions?, publicPath?, serveIndex?, watch? } | [non-empty string | object { directory?, staticOptions?, publicPath?, serveIndex?, watch? }, ...] (should not have fewer than 1 item)
-> It is possible to configure advanced options for serving static files from contentBase. See the Express documentation for the possible options. https://webpack.js.org/configuration/dev-server/#devserverstatic
Details:
* configuration.static[0] should be one of these:
non-empty string | object { directory?, staticOptions?, publicPath?, serveIndex?, watch? }
Expand Down
2 changes: 2 additions & 0 deletions test/__snapshots__/Validation.test.js.snap.webpack5
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ exports[`Validation validation should fail validation for invalid \`hot\` config
"Invalid configuration object. Object has been initialized using a configuration object that does not match the API schema.
- configuration.hot should be one of these:
boolean | \\"only\\"
-> Enable webpack's Hot Module Replacement feature. https://webpack.js.org/configuration/dev-server/#devserverhot
Details:
* configuration.hot should be a boolean.
* configuration.hot should be \\"only\\"."
Expand Down Expand Up @@ -31,6 +32,7 @@ exports[`Validation validation should fail validation for invalid \`static\` con
"Invalid configuration object. Object has been initialized using a configuration object that does not match the API schema.
- configuration.static should be one of these:
boolean | non-empty string | object { directory?, staticOptions?, publicPath?, serveIndex?, watch? } | [non-empty string | object { directory?, staticOptions?, publicPath?, serveIndex?, watch? }, ...] (should not have fewer than 1 item)
-> It is possible to configure advanced options for serving static files from contentBase. See the Express documentation for the possible options. https://webpack.js.org/configuration/dev-server/#devserverstatic
Details:
* configuration.static[0] should be one of these:
non-empty string | object { directory?, staticOptions?, publicPath?, serveIndex?, watch? }
Expand Down

0 comments on commit 7c74b8a

Please sign in to comment.