postcss-tidy-columns
Advanced tools
Comparing version 0.4.0-beta5 to 0.4.0-beta6
@@ -10,3 +10,3 @@ # Change Log | ||
- Adds a `tidy-var()` function for retrieving option values in property values (#27, #32) | ||
- Adds `debug` option for maintaining the input declaration as a comment (#45) | ||
- Adds `debug` option for maintaining the input declaration as a comment (#45, #48) | ||
@@ -13,0 +13,0 @@ **Changed** |
{ | ||
"name": "postcss-tidy-columns", | ||
"version": "0.4.0-beta5", | ||
"version": "0.4.0-beta6", | ||
"description": "PostCSS plugin to manage column and margin alignment.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
const postcss = require('postcss'); | ||
const cleanClone = require('./lib/cleanClone'); | ||
const detectCalcWrapper = require('./lib/detectCalcWrapper'); | ||
const hasComment = require('./lib/hasComment'); | ||
@@ -69,4 +70,8 @@ /** | ||
// Save the original declaration in a comment for debugging. | ||
if (options.debug) { | ||
declaration.cloneBefore(postcss.comment({ text: declaration })); | ||
if ( | ||
options.debug | ||
&& undefined !== declaration.parent | ||
&& !hasComment(declaration) | ||
) { | ||
declaration.cloneBefore(postcss.comment({ text: declaration.toString() })); | ||
} | ||
@@ -73,0 +78,0 @@ |
const postcss = require('postcss'); | ||
const cleanClone = require('./lib/cleanClone'); | ||
const hasComment = require('./lib/hasComment'); | ||
@@ -38,4 +39,8 @@ /** | ||
// Save the original declaration in a comment for debugging. | ||
if (options.debug) { | ||
declaration.cloneBefore(postcss.comment({ text: declaration })); | ||
if ( | ||
options.debug | ||
&& undefined !== declaration.parent | ||
&& !hasComment(declaration) | ||
) { | ||
declaration.cloneBefore(postcss.comment({ text: declaration.toString() })); | ||
} | ||
@@ -79,4 +84,8 @@ | ||
// Save the original declaration in a comment for debugging. | ||
if (options.debug) { | ||
declaration.cloneBefore(postcss.comment({ text: declaration })); | ||
if ( | ||
options.debug | ||
&& undefined !== declaration.parent | ||
&& !hasComment(declaration) | ||
) { | ||
declaration.cloneBefore(postcss.comment({ text: declaration.toString() })); | ||
} | ||
@@ -83,0 +92,0 @@ |
const postcss = require('postcss'); | ||
const cleanClone = require('./lib/cleanClone'); | ||
const cleanShorthandValues = require('./lib/cleanShorthandValues'); | ||
const hasComment = require('./lib/hasComment'); | ||
@@ -54,4 +55,8 @@ /** | ||
// Save the original declaration in a comment for debugging. | ||
if (options.debug) { | ||
declaration.cloneBefore(postcss.comment({ text: declaration })); | ||
if ( | ||
options.debug | ||
&& undefined !== declaration.parent | ||
&& !hasComment(declaration) | ||
) { | ||
declaration.cloneBefore(postcss.comment({ text: declaration.toString() })); | ||
} | ||
@@ -116,4 +121,8 @@ | ||
// Save the original declaration in a comment for debugging. | ||
if (options.debug) { | ||
declaration.cloneBefore(postcss.comment({ text: declaration })); | ||
if ( | ||
options.debug | ||
&& undefined !== declaration.parent | ||
&& !hasComment(declaration) | ||
) { | ||
declaration.cloneBefore(postcss.comment({ text: declaration.toString() })); | ||
} | ||
@@ -120,0 +129,0 @@ |
/* eslint-disable no-param-reassign */ | ||
const postcss = require('postcss'); | ||
const cleanClone = require('./lib/cleanClone'); | ||
const hasComment = require('./lib/hasComment'); | ||
@@ -53,4 +54,8 @@ /** | ||
// Save the original declaration in a comment for debugging. | ||
if (options.debug) { | ||
declaration.cloneBefore(postcss.comment({ text: declaration })); | ||
if ( | ||
options.debug | ||
&& undefined !== declaration.parent | ||
&& !hasComment(declaration) | ||
) { | ||
declaration.cloneBefore(postcss.comment({ text: declaration.toString() })); | ||
} | ||
@@ -57,0 +62,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
105466
47
1459