size-limit
Advanced tools
Comparing version 5.0.5 to 6.0.0
@@ -46,2 +46,4 @@ let { bold: b, yellow: y, red } = require('picocolors') | ||
` ${y('--why')} Show package content`, | ||
` ${y('--compare-with')} Path to stats.json from another build` + | ||
` to compare`, | ||
` ${y('--save-bundle DIR')} Put build files to check them by hand`, | ||
@@ -48,0 +50,0 @@ ` ${y('--clean-dir')} Remove build files folder before start` |
@@ -24,3 +24,5 @@ let { isAbsolute, dirname, join, relative } = require('path') | ||
hidePassed: false, | ||
highlightLess: false | ||
highlightLess: false, | ||
compareWith: 'webpack', | ||
uiReports: 'webpack' | ||
} | ||
@@ -88,2 +90,7 @@ | ||
} | ||
if (args.compareWith) { | ||
config.compareWith = toAbsolute(args.compareWith, process.cwd()) | ||
} | ||
if (args.saveBundle) { | ||
@@ -90,0 +97,0 @@ config.saveBundle = toAbsolute(args.saveBundle, process.cwd()) |
{ | ||
"name": "size-limit", | ||
"version": "5.0.5", | ||
"version": "6.0.0", | ||
"description": "CLI tool for Size Limit", | ||
@@ -27,4 +27,4 @@ "keywords": [ | ||
"mico-spinner": "^1.3.0", | ||
"picocolors": "^0.1.0" | ||
"picocolors": "^0.2.1" | ||
} | ||
} |
@@ -37,2 +37,14 @@ let SizeLimitError = require('./size-limit-error') | ||
args.why = true | ||
} else if (arg === '--compare-with') { | ||
if (!plugins.has('webpack')) { | ||
throw new SizeLimitError('argWithoutWebpack', '--compare-with') | ||
} | ||
if (!args.why) { | ||
throw new SizeLimitError('argWithoutAnotherArg', 'compare-with', 'why') | ||
} | ||
let nextArg = argv[++i] | ||
if (!nextArg || nextArg.startsWith('--')) { | ||
throw new SizeLimitError('argWithoutParameter', 'compare-with', 'FILE') | ||
} | ||
args.compareWith = nextArg | ||
} else if (arg === '--watch') { | ||
@@ -39,0 +51,0 @@ args.watch = true |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
29086
832
- Removedpicocolors@0.1.0(transitive)
Updatedpicocolors@^0.2.1