# Pattern filtering 

As replacement for exclude we now have patterns in place of exclude to include or exclude a file based on its name in package.json.


# Example for patterns : 

**Old System** : 
To exclude `node_modules` folder from convertion for the `cssVariableReplacement` plugin, we used to have :

`react-cli > app > exclude > cssVariableReplacement` as ['node_modules'] in `package.json`

Example : 

"exclude": {
    "cssVariableReplacement": [
        "node_modules"
    ]
},

**New System** : 

To include all files for convertion for the `valueReplacer` plugin, we now have : 

`react-cli > app > patterns > valueReplacer` as ['*'] in `package.json`

To include `src` files for convertion for the `cssVariableReplacement` plugin, we now have : 

`react-cli > app > patterns > hoverActive` as ['src'] in `package.json`

To exclude `node_modules` files for convertion for the `hoverActive` plugin, we now have : 

`react-cli > app > patterns > cssVariableReplacement` as ['!node_modules'] in `package.json`
Here the `!` denotes that the folder structure/file is not to be converted.

Example : 

"patterns": {
    "valueReplacer": [
        "*"
    ],
    "hoverActive": [
        "src"
    ],
    "cssVariableReplacement": [
        "!node_modules"
    ],
},

Note : 
`patterns` also added support for cssUniqueness to be applied to selective files.

"patterns" : {
    "cssUniqueness": [
        "*"
    ],
}