Skip to content

Commit e5d87a5

Browse files
committed
updated cli to renameCssSelectors
1 parent 5b2ad7f commit e5d87a5

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

index.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ const _ = require('lodash');
1010
/**
1111
* parses through every single document and renames the names
1212
*
13-
* @module cli
13+
* @module renameCssSelectors
1414
*/
15-
const cli = module.exports = {};
15+
const renameCssSelectors = module.exports = {};
1616

1717
/**
1818
* @typedef {Object} processOptions
@@ -30,7 +30,7 @@ const cli = module.exports = {};
3030
* @param {Function} cb the callback
3131
* @return {Function} cb
3232
*/
33-
cli.process = (pathString, options, cb) => {
33+
renameCssSelectors.process = (pathString, options, cb) => {
3434
const optionsDefault = {
3535
collectSelectors: false,
3636
overwrite: false,
@@ -118,24 +118,24 @@ cli.process = (pathString, options, cb) => {
118118

119119
/**
120120
* process over all css files - set and replace
121-
* does exactly the same as cli.process, but set the collectSelectors option to true
121+
* does exactly the same as renameCssSelectors.process, but set the collectSelectors option to true
122122
*
123123
* @param {pathString} pathString this pathString can be either an expression for `glob` or a filepath
124124
* @param {processOptions} options
125125
* @param {Function} cb the callback
126126
* @return {Function} cb
127127
*/
128-
cli.processCss = (pathString, options, cb) => {
128+
renameCssSelectors.processCss = (pathString, options, cb) => {
129129
// set cb if options are not set
130130
if (typeof cb !== 'function') {
131131
cb = options;
132132
options = {};
133133
}
134134

135-
// set the css power for cli.process
135+
// set the css power for renameCssSelectors.process
136136
options.collectSelectors = true;
137137

138-
cli.process(pathString, options, cb);
138+
renameCssSelectors.process(pathString, options, cb);
139139
} // /processCss
140140

141141
/**
@@ -154,7 +154,7 @@ cli.processCss = (pathString, options, cb) => {
154154
* @param {String} pathString where it should get saved
155155
* @param {generateLFOptions} [options]
156156
*/
157-
cli.generateLibraryFile = (pathString, options, cb) => {
157+
renameCssSelectors.generateLibraryFile = (pathString, options, cb) => {
158158
let mappingName = 'CSS_NAME_MAPPING';
159159
let mappingNameMin = 'CSS_NAME_MAPPING_MIN';
160160
const optionsDefault = {
@@ -229,7 +229,7 @@ cli.generateLibraryFile = (pathString, options, cb) => {
229229
/**
230230
* includes .rcsrc - if not found it will include "rcs" in package.json
231231
*/
232-
cli.includeConfig = (pathString) => {
232+
renameCssSelectors.includeConfig = (pathString) => {
233233
let configObject;
234234

235235
pathString = pathString || path.join(process.cwd(), '.rcsrc');

0 commit comments

Comments
 (0)