Skip to content

Commit 7f612f1

Browse files
committed
Docs: add rcsCore usage (closes #65)
1 parent 83118d0 commit 7f612f1

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

README.md

+5
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ Async:
3838
> There are 3 different ways of writing async `rcs` code: callbacks, promises and async/await
3939
4040
```js
41+
// you can use every method of `rcs-core` on top
42+
const rcsCore = require('rcs-core');
4143
const rcs = require('rename-css-selectors')
4244

4345
// if you want to include the .rcsrc config
@@ -47,6 +49,9 @@ rcs.config.load();
4749
// you can also specify the string although it does not exist yet.
4850
rcs.loadMapping('./renaming_map.json');
4951

52+
// now with rcsCore you could e.g. ignore single variables (optional)
53+
rcsCore.baseLibrary.setExclude(/<%=[\s\S]+%>/);
54+
5055
// callback
5156
rcs.process.auto(['**/*.js', '**/*.html', '**/*.css'], options, (err) => {
5257
// all css files are now saved, renamed and stored in the selectorLibrary

0 commit comments

Comments
 (0)