atomic-css-stats
Advanced tools
Comparing version 0.1.0-beta.2 to 0.1.0-beta.3
@@ -45,8 +45,9 @@ #!/usr/bin/env node | ||
Gzipped size: ${stats.original.gzipSize} | ||
Brotli size: ${stats.original.brotliSize} | ||
Atomized size: ${stats.atomic.size} | ||
Gzipped atomized size: ${stats.atomic.gzipSize} | ||
Brotli atomized size: ${stats.atomic.brotliSize} | ||
`) | ||
}) | ||
}()); |
15
index.js
const filesize = require('filesize') | ||
const gzipSize = require('gzip-size') | ||
const brotliSize = require('brotli-size') | ||
const mrmuh = require('murmurhash') | ||
@@ -9,17 +10,15 @@ const hash = str => mrmuh(str, str.length).toString(36) | ||
const originalSize = filesize(content.length) | ||
const originalGzippedSize = filesize(gzipSize.sync(content)) | ||
const atomizedContent = await atomizer(content) | ||
const atomicSize = filesize(atomizedContent.length) | ||
const atomicGzippedSize = filesize(gzipSize.sync(atomizedContent)) | ||
return { | ||
original: { | ||
size: originalSize, | ||
gzipSize: originalGzippedSize, | ||
size: filesize(content.length), | ||
gzipSize: filesize(gzipSize.sync(content)), | ||
brotliSize:filesize(brotliSize.sync(content)) | ||
}, | ||
atomic: { | ||
size: atomicSize, | ||
gzipSize: atomicGzippedSize, | ||
size: atomizedContent.length, | ||
gzipSize: filesize(gzipSize.sync(atomizedContent)), | ||
brotliSize: filesize(brotliSize.sync(atomizedContent)), | ||
} | ||
@@ -26,0 +25,0 @@ } |
{ | ||
"name": "atomic-css-stats", | ||
"version": "0.1.0-beta.2", | ||
"version": "0.1.0-beta.3", | ||
"description": "Provides information about regular and compiled to atomic CSS classes files size (gzipped)", | ||
@@ -23,2 +23,3 @@ "main": "index.js", | ||
"dependencies": { | ||
"brotli-size": "^0.0.2", | ||
"filesize": "^3.6.1", | ||
@@ -25,0 +26,0 @@ "gzip-size": "^5.0.0", |
# atomic-css-stats | ||
Provides stats on `.css` files size (gzipped). Also compiles the styles to atomic CSS classes for compariaon. | ||
Provides stats on `.css` files size (gzipped and brotli). Also compiles the styles to atomic CSS classes for compariaon. | ||
@@ -18,13 +18,15 @@ ``` | ||
``` | ||
$ acss-stats https://abs.twimg.com/a/1531883619/css/t1/twitter_core.bundle.css | ||
$ acss-stats https://abs.twimg.com/a/1532484778/css/t1/twitter_core.bundle.css | ||
============== | ||
|| https://abs.twimg.com/a/1531883619/css/t1/twitter_core.bundle.css | ||
|| https://abs.twimg.com/a/1532484778/css/t1/twitter_core.bundle.css | ||
============== | ||
Size: 182.34 KB | ||
Gzipped size: 34.01 KB | ||
Size: 182.72 KB | ||
Gzipped size: 34.08 KB | ||
Brotli size: 28.95 KB | ||
Atomized size: 60 KB | ||
Gzipped atomized size: 15.46 KB | ||
Atomized size: 61494 | ||
Gzipped atomized size: 15.48 KB | ||
Brotli atomized size: 12.83 KB | ||
``` | ||
@@ -31,0 +33,0 @@ |
Sorry, the diff of this file is not supported yet
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
22321
82
41
6
+ Addedbrotli-size@^0.0.2
+ Addedansi-regex@2.1.1(transitive)
+ Addedaproba@1.2.0(transitive)
+ Addedare-we-there-yet@1.1.7(transitive)
+ Addedbase64-js@1.5.1(transitive)
+ Addedbl@4.1.0(transitive)
+ Addedbrotli-size@0.0.2(transitive)
+ Addedbuffer@5.7.1(transitive)
+ Addedchownr@1.1.4(transitive)
+ Addedcode-point-at@1.1.0(transitive)
+ Addedconsole-control-strings@1.1.0(transitive)
+ Addedcore-util-is@1.0.3(transitive)
+ Addeddecompress-response@4.2.1(transitive)
+ Addeddeep-extend@0.6.0(transitive)
+ Addeddelegates@1.0.0(transitive)
+ Addeddetect-libc@1.0.3(transitive)
+ Addedend-of-stream@1.4.4(transitive)
+ Addedexpand-template@2.0.3(transitive)
+ Addedfs-constants@1.0.0(transitive)
+ Addedgauge@2.7.4(transitive)
+ Addedgithub-from-package@0.0.0(transitive)
+ Addedhas-unicode@2.0.1(transitive)
+ Addedieee754@1.2.1(transitive)
+ Addediltorb@2.4.5(transitive)
+ Addedinherits@2.0.4(transitive)
+ Addedini@1.3.8(transitive)
+ Addedis-fullwidth-code-point@1.0.0(transitive)
+ Addedisarray@1.0.0(transitive)
+ Addedmimic-response@2.1.0(transitive)
+ Addedminimist@1.2.8(transitive)
+ Addedmkdirp-classic@0.5.3(transitive)
+ Addednan@2.22.0(transitive)
+ Addednapi-build-utils@1.0.2(transitive)
+ Addednode-abi@2.30.1(transitive)
+ Addednoop-logger@0.1.1(transitive)
+ Addednpmlog@4.1.2(transitive)
+ Addednumber-is-nan@1.0.1(transitive)
+ Addedobject-assign@4.1.1(transitive)
+ Addedonce@1.4.0(transitive)
+ Addedprebuild-install@5.3.6(transitive)
+ Addedprocess-nextick-args@2.0.1(transitive)
+ Addedpump@3.0.2(transitive)
+ Addedrc@1.2.8(transitive)
+ Addedreadable-stream@2.3.83.6.2(transitive)
+ Addedsafe-buffer@5.1.2(transitive)
+ Addedsemver@5.7.2(transitive)
+ Addedset-blocking@2.0.0(transitive)
+ Addedsignal-exit@3.0.7(transitive)
+ Addedsimple-concat@1.0.1(transitive)
+ Addedsimple-get@3.1.1(transitive)
+ Addedstring-width@1.0.2(transitive)
+ Addedstring_decoder@1.1.1(transitive)
+ Addedstrip-ansi@3.0.1(transitive)
+ Addedstrip-json-comments@2.0.1(transitive)
+ Addedtar-fs@2.1.1(transitive)
+ Addedtar-stream@2.2.0(transitive)
+ Addedtunnel-agent@0.6.0(transitive)
+ Addedutil-deprecate@1.0.2(transitive)
+ Addedwhich-pm-runs@1.1.0(transitive)
+ Addedwide-align@1.1.5(transitive)
+ Addedwrappy@1.0.2(transitive)