This package returns a set of information related to the local environment.
#npm
npm i -D @webpack-cli/info
#yarn
yarn add @webpack-cli/info -D
#npx
npx webpack info [options]
Flag | Description | Type |
---|---|---|
--output-json |
To get the output as JSON | [ boolean ] |
--output-markdown |
To get the output as markdown | [ boolean ] |
Not supported for config
Flag | Description | Type |
---|---|---|
--help |
Show help | [ boolean ] |
--version |
Show version number of webpack-cli |
[ boolean ] |
--system , -s |
System information ( OS, CPU ) | [ boolean ] |
--binaries , -b |
Installed binaries (Node, yarn, npm) | [ boolean ] |
--browsers |
Installed web browsers | [ boolean ] |
--npmg |
Globally installed NPM packages ( webpack & webpack-cli only ) | [ boolean ] |
--npmPackages |
Info about packages related to webpack installed in the project | [ boolean ] |
const info = require('@webpack-cli/info').default;
async function wrapperFunc() {
await info({
/* Custom Config */
});
}
wrapperFunc();
Config has higher precedence than system flags
// Config's relative path
{
"config": [string]
}
// System info
{
"binaries": [boolean],
"system": [boolean],
"browsers": [boolean],
"npmg": [boolean],
"npmPackages": [boolean],
}
The function returns string
for system
info, and returns an array of strings (string[]
) for config
webpack-cli info --FLAGS #Flags are optional for custom output