@eva/inspector-decorator
Advanced tools
Comparing version 0.0.4 to 0.0.5
{ | ||
"name": "@eva/inspector-decorator", | ||
"version": "0.0.4", | ||
"version": "0.0.5", | ||
"scripts": { | ||
"dev": "rollup -c rollup.config.dev.js -w", | ||
"build": "node ./scripts/build.js", | ||
"buildDev": "npm run build -- -d", | ||
"buildProd": "npm run build -- -r", | ||
"server": "npx http-server ./ -c-1" | ||
"buildProd": "npm run build -- -r" | ||
}, | ||
@@ -14,3 +12,2 @@ "main": "index.js", | ||
"typings": "./dist/inspector-decorator.d.ts", | ||
"bundle": "EVA.inspector.decorator", | ||
"keywords": [ | ||
@@ -37,3 +34,3 @@ "eva.js", | ||
"execa": "^4.1.0", | ||
"fs-extra": "^9.0.1", | ||
"fs-extra": "^9.1.0", | ||
"glob": "^7.1.3", | ||
@@ -40,0 +37,0 @@ "http-server": "^0.11.1", |
@@ -23,4 +23,2 @@ /* | ||
const execa = require('execa'); | ||
const {gzipSync} = require('zlib'); | ||
const {compress} = require('brotli'); | ||
@@ -45,3 +43,2 @@ const args = require('minimist')(process.argv.slice(2)); | ||
await build(); | ||
checkFileSize(`${pkgDir}/dist/index.global.js`); | ||
} | ||
@@ -97,14 +94,1 @@ | ||
} | ||
function checkFileSize(filePath) { | ||
if (!fs.existsSync(filePath)) return; | ||
const file = fs.readFileSync(filePath); | ||
const minSize = (file.length / 1024).toFixed(2) + 'kb'; | ||
const gzipped = gzipSync(file); | ||
const gzippedSize = (gzipped.length / 1024).toFixed(2) + 'kb'; | ||
const compressed = compress(file); | ||
const compressedSize = (compressed.length / 1024).toFixed(2) + 'kb'; | ||
console.log( | ||
`${chalk.gray(chalk.bold(path.basename(filePath)))} min:${minSize} / gzip:${gzippedSize} / brotli:${compressedSize}`, | ||
); | ||
} |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
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
9568
10
181
2