postcss-secmodify
Advanced tools
Comparing version 0.1.1 to 1.0.0
# Changelog | ||
## v1.0.0 | ||
- Finalized behavior, tests now have coverage over all sections of code. | ||
- Starting consideration for forwards compatability | ||
## v0.1.0 | ||
- First release. |
@@ -14,4 +14,4 @@ 'use strict'; | ||
return; | ||
} else if (typeof SMI.rString !== 'string') { | ||
result.warn('\'rString\', the value that will be used during a replace is not a string, make sure you give \'rString\' a string when passing it in.'); | ||
} else if (typeof SMI.rString !== 'string' && typeof SMI.rString !== 'function') { | ||
result.warn('\'rString\', the value that will be used during a replace is not a string or a function, make sure you give \'rString\' a string when passing it in.'); | ||
return; | ||
@@ -72,3 +72,3 @@ } | ||
str = node[key]; | ||
} else if (!mediaOnly) { | ||
} else if (!mediaOnly && !hasMediaAncestor(node)) { | ||
str = node[key]; | ||
@@ -75,0 +75,0 @@ } |
@@ -8,3 +8,3 @@ { | ||
"license": "MIT", | ||
"version": "0.1.1", | ||
"version": "1.0.0", | ||
"description": "Sectional modification of css by RegEx or Strings.", | ||
@@ -11,0 +11,0 @@ "homepage": "https://github.com/travco/postcss-secmodify", |
@@ -42,10 +42,10 @@ # postcss-secmodify [![Build Status](https://travis-ci.org/travco/postcss-secmodify.svg?branch=master)](https://travis-ci.org/travco/postcss-secmodify) | ||
``` | ||
rString's value is a string that will be used when replacing (aka: the new stuff that gets put in) and is the only mandatory key and value. It can be an empty string of course, if you feel like removing stuff, and can use the [`$` patterns](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace#Specifying_a_string_as_a_parameter) to manipulate what is inserted. | ||
rString's value is a string or function that will be used when replacing (aka: the new stuff that gets put in) and is the only mandatory key and value. It can be an empty string of course, if you feel like removing stuff. It can also use the [`$` patterns](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace#Specifying_a_string_as_a_parameter) to manipulate what is inserted, or, by [inserting a function to use](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace#Specifying_a_function_as_a_parameter) you can do much more than simple replacing. | ||
Everything but 'rString' takes in what will be used to match in it's particular section of the css | ||
- sel's value(s) match selectors for rules (e.g. `.foo`), | ||
- dec's value(s) match declaration properties (e.g. `color`), | ||
- decVal's value(s) match declaration values (e.g. `blue`), | ||
- atRule's value(s) match parameters of all at-rules (e.g. the `screen` in `@media screen {`) | ||
- media's value(s) match parameters of only `@media` statements | ||
- sel's value(s) match selectors for rules (e.g. `.foo`) outside of `@media` blocks, | ||
- dec's value(s) match declaration properties (e.g. `color`) outside of `@media` blocks, | ||
- decVal's value(s) match declaration values (e.g. `blue`) outside of `@media` blocks, | ||
- atRule's value(s) match parameters of non-media at-rules (e.g. the `screen` in `@special screen {`) outside of `@media` blocks, | ||
- media's value(s) match parameters of only `@media` statements, | ||
- selInMedia's value(s) match selectors for rules, but only inside `@media` statements | ||
@@ -52,0 +52,0 @@ |
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
11222
0