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

Flags for Webpack-bundle-analyser #646

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
165 changes: 165 additions & 0 deletions bin/bundle-analyzer-flags.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,165 @@
"use strict";

Check failure on line 1 in bin/bundle-analyzer-flags.js

View workflow job for this annotation

GitHub Actions / lint

Strings must use singlequote

module.exports = {
version: {
configs: [
{
type: "boolean",

Check failure on line 7 in bin/bundle-analyzer-flags.js

View workflow job for this annotation

GitHub Actions / lint

Strings must use singlequote
multiple: false,
description: "Output the version number",

Check failure on line 9 in bin/bundle-analyzer-flags.js

View workflow job for this annotation

GitHub Actions / lint

Strings must use singlequote
path: "version",

Check failure on line 10 in bin/bundle-analyzer-flags.js

View workflow job for this annotation

GitHub Actions / lint

Strings must use singlequote

Check failure on line 10 in bin/bundle-analyzer-flags.js

View workflow job for this annotation

GitHub Actions / lint

Unexpected trailing comma
},

Check failure on line 11 in bin/bundle-analyzer-flags.js

View workflow job for this annotation

GitHub Actions / lint

Unexpected trailing comma
],
description: "Output the version number",

Check failure on line 13 in bin/bundle-analyzer-flags.js

View workflow job for this annotation

GitHub Actions / lint

Strings must use singlequote
simpleType: "boolean",

Check failure on line 14 in bin/bundle-analyzer-flags.js

View workflow job for this annotation

GitHub Actions / lint

Strings must use singlequote
multiple: false,

Check failure on line 15 in bin/bundle-analyzer-flags.js

View workflow job for this annotation

GitHub Actions / lint

Unexpected trailing comma
},
mode: {
configs: [
{
type: "enum",

Check failure on line 20 in bin/bundle-analyzer-flags.js

View workflow job for this annotation

GitHub Actions / lint

Strings must use singlequote
values: ["server", "static", "json"],
multiple: false,
description:
"The mode to run the analyzer in: server, static, or json.",
path: "mode",
defaultValue: "server",
},
],
description: "The mode to run the analyzer in: server, static, or json.",
simpleType: "string",
multiple: false,
},
report: {
configs: [
{
type: "string",
multiple: false,
description:
'Path to bundle report file that will be generated in "static" mode.',
path: "report",
defaultValue: "report.html",
},
],
description:
'Path to bundle report file that will be generated in "static" mode.',
simpleType: "string",
multiple: false,
},
title: {
configs: [
{
type: "string",
multiple: false,
description: "String to use in title element of html report.",
path: "title",
defaultValue: "Webpack Bundle Report",
},
],
description: "String to use in title element of html report.",
simpleType: "string",
multiple: false,
},
size: {
configs: [
{
type: "enum",
values: ["stat", "parsed", "gzip"],
multiple: false,
description: "Module sizes to show in treemap by default.",
path: "defaultSizes",
defaultValue: "parsed",
},
],
description: "Module sizes to show in treemap by default.",
simpleType: "string",
multiple: false,
},
"Dont Open": {
configs: [
{
type: "boolean",
multiple: false,
description: "Don't open report in default browser automatically",
path: "noOpen",
defaultValue: false,
},
],
description: "Don't open report in default browser automatically",
simpleType: "boolean",
multiple: false,
},
port: {
configs: [
{
type: "number",
multiple: false,
description:
"Port that will be used in `server` mode, default is 8888.",
path: "port",
defaultValue: 8888,
},
],
description: "Port that will be used in `server` mode, default is 8888.",
simpleType: "number",
multiple: false,
},
host: {
configs: [
{
type: "string",
multiple: false,
description:
"Host that will be used in `server` mode, default is 127.0.0.1.",
path: "host",
defaultValue: "127.0.0.1",
},
],
description:
"Host that will be used in `server` mode, default is 127.0.0.1.",
simpleType: "string",
multiple: false,
},
"log-level": {
configs: [
{
type: "enum",
values: ["debug", "info", "warn", "error", "silent"],
multiple: true,
description: "Level of logger (info, warn, error, silent).",
path: "logLevel",
defaultValue: "info",
},
],
description: "Level of logger (info, warn, error, silent).",
simpleType: "string",
multiple: true,
},
exclude: {
configs: [
{
type: "string",
multiple: false,
description: "Assets that should be excluded from the report.",
path: "exclude",
defaultValue: "",
},
],
description: "Assets that should be excluded from the report.",
simpleType: "string",
multiple: false,
},
help: {
configs: [
{
type: "boolean",
multiple: false,
description: "output usage information",
path: "help",
},
],
description: "Output usage information",
simpleType: "boolean",
multiple: false,
},
};