config.load([pathLocation])
All available configs here
RCS will lookup first for a .rcsrc
of the current directory. If there is no such file, it will lookup for a package.json
with a "rcsrc": {}
in it. You can also write any path in the parameters and write your own config file. This function is synchronous.
Parameters:
- pathLocation
<String>
optional
Example:
const rcs = require('rename-css-selectors');
rcs.config.load();
Just create a
.rcsrc
in your project root or you can add everything in yourpackage.json
with the valuercs
The .rcsrc
or the a own config file:
{
"exclude": [
"js",
"flexbox"
]
}
The package.json
:
{
"name": "Your application name",
"rcs": {
"exclude": [
"js",
"flexbox"
]
}
}
exclude
What if you are using something such as Modernizr and you do not want to minify some selectors?
Let's exclude 4 classes and id's: js
, flexbox
, canvas
and svg
{
"exclude": [
"js",
"flexbox",
"canvas",
"svg"
]
}
ignore
If you need to ignore some file or some file pattern from processing, this is how to do it using minimatch pattern (glob) Please notice that filepathes are matched absolutely.
{
"ignore": [
"relativeFile.js",
"**/*.min.js",
]
}