Socket
Socket
Sign inDemoInstall

postcss-critical-css

Package Overview
Dependencies
0
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.1 to 1.0.2

test/fixtures/this.critical.expected.css

7

index.js

@@ -167,3 +167,3 @@ 'use strict';

function buildCritical(options) {
var args = Object.assign({
var args = Object.assign({}, {
outputPath: process.cwd(),

@@ -173,4 +173,3 @@ preserve: true,

dryRun: false
}, options || {});
}, options);
return function (css, result) {

@@ -200,3 +199,3 @@ var criticalOutput = getCriticalRules(css, args.preserve);

if (!args.dryRun) {
fs.writeFile(path.join(args.outputPath, fileName), result);
fs.writeFileSync(path.join(args.outputPath, fileName), result);
} else {

@@ -203,0 +202,0 @@ console.log(chalk.green('\nCritical CSS result is:\n' + chalk.yellow(result.css)));

{
"name": "postcss-critical-css",
"version": "1.0.1",
"version": "1.0.2",
"description": "Generate critical CSS using PostCSS",

@@ -25,8 +25,11 @@ "main": "index.js",

"cssnano": "^3.5.2",
"postcss": "^5.0.5"
"postcss": "^5.0.5",
"tape": "^4.6.0"
},
"scripts": {
"build": "babel src/index.js --out-file index.js",
"start": "babel src/index.js --out-file index.js --watch"
"start": "babel src/index.js --out-file index.js --watch",
"pretest": "./node_modules/.bin/babel-node test/preTest.js",
"test": "npm run pretest && tape test"
}
}

@@ -178,3 +178,2 @@ 'use strict';

for (let fileName in criticalOutput) {
console.log(fileName);
let criticalCSS = postcss.parse('');

@@ -181,0 +180,0 @@ let critical = '';

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc