rollup-plugin-css-only
Advanced tools
Comparing version 0.0.2 to 0.0.3
'use strict'; | ||
Object.defineProperty(exports, '__esModule', { value: true }); | ||
var fs = require('fs'); | ||
@@ -76,2 +78,21 @@ var rollupPluginutils = require('rollup-pluginutils'); | ||
module.exports = css; | ||
function emitted (text, bytes) { | ||
console.log(green(text), getSize(bytes)) | ||
} | ||
function green (text) { | ||
return '\u001b[1m\u001b[32m' + text + '\u001b[39m\u001b[22m' | ||
} | ||
function getSize (bytes) { | ||
return bytes < 10000 | ||
? bytes.toFixed(0) + ' B' | ||
: bytes < 1024000 | ||
? (bytes / 1024).toPrecision(3) + ' kB' | ||
: (bytes / 1024 / 1024).toPrecision(4) + ' MB' | ||
} | ||
exports['default'] = css; | ||
exports.emitted = emitted; | ||
exports.green = green; | ||
exports.getSize = getSize; |
@@ -74,2 +74,18 @@ import { writeFile } from 'fs'; | ||
export default css; | ||
function emitted (text, bytes) { | ||
console.log(green(text), getSize(bytes)) | ||
} | ||
function green (text) { | ||
return '\u001b[1m\u001b[32m' + text + '\u001b[39m\u001b[22m' | ||
} | ||
function getSize (bytes) { | ||
return bytes < 10000 | ||
? bytes.toFixed(0) + ' B' | ||
: bytes < 1024000 | ||
? (bytes / 1024).toPrecision(3) + ' kB' | ||
: (bytes / 1024 / 1024).toPrecision(4) + ' MB' | ||
} | ||
export { emitted, green, getSize };export default css; |
{ | ||
"name": "rollup-plugin-css-only", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"description": "Rollup plugin that bundles imported css", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.cjs.js", |
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
11377
6
214