postcss-cli
Advanced tools
Comparing version 9.0.2 to 9.1.0
11
index.js
@@ -253,7 +253,7 @@ #!/usr/bin/env node | ||
if (options.to) { | ||
tasks.push(fs.outputFile(options.to, result.css)) | ||
tasks.push(outputFile(options.to, result.css)) | ||
if (result.map) { | ||
const mapfile = getMapfile(options) | ||
tasks.push(fs.outputFile(mapfile, result.map.toString())) | ||
tasks.push(outputFile(mapfile, result.map.toString())) | ||
} | ||
@@ -282,2 +282,9 @@ } else process.stdout.write(result.css, 'utf8') | ||
}) | ||
async function outputFile(file, string) { | ||
const fileExists = await fs.pathExists(file) | ||
const currentValue = fileExists ? await fs.readFile(file, 'utf8') : null | ||
if (currentValue === string) return | ||
return fs.outputFile(file, string) | ||
} | ||
} | ||
@@ -284,0 +291,0 @@ |
{ | ||
"name": "postcss-cli", | ||
"version": "9.0.2", | ||
"version": "9.1.0", | ||
"description": "CLI for PostCSS", | ||
@@ -38,7 +38,7 @@ "type": "module", | ||
"coveralls": "^3.0.0", | ||
"eslint": "^7.8.0", | ||
"eslint-config-problems": "5.0.0", | ||
"eslint": "^8.2.0", | ||
"eslint-config-problems": "6.0.0", | ||
"postcss": "^8.0.4", | ||
"postcss-import": "^14.0.0", | ||
"prettier": "~2.4.0", | ||
"prettier": "~2.5.0", | ||
"sugarss": "^4.0.0", | ||
@@ -45,0 +45,0 @@ "uuid": "^8.0.0" |
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
22516
425