Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

atomic-css-stats

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

atomic-css-stats - npm Package Compare versions

Comparing version 0.1.0-beta.2 to 0.1.0-beta.3

3

cli.js

@@ -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}
`)
})
}());
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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc