Skip to content

Commit 7caa4d3

Browse files
docs: correct help text for replace-variables
1 parent 05656da commit 7caa4d3

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

bin/paragon-scripts.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,12 +133,12 @@ const COMMANDS = {
133133
options: [
134134
{
135135
name: '-s, --source',
136-
description: 'Type of replacement: usage or definition. If set to "definition" the command will only update SCSS variables definitions with CSS variables, if set to "usage" - all occurrences of SCSS variables will we replaced',
136+
description: 'The path to the source directory containing variable mappings.',
137137
defaultValue: '\'\'',
138138
},
139139
{
140140
name: '-t, --replacementType',
141-
description: 'Type of replacement: usage or definition. If set to "definition" the command will only update SCSS variables definitions with CSS variables, if set to "usage" - all occurrences of SCSS variables will we replaced',
141+
description: 'Type of replacement: usage or definition. If set to "definition" the command will only update SCSS variables definitions with CSS variables, if set to "usage" - all occurrences of SCSS variables will be replaced.',
142142
choices: '[usage|definition]',
143143
defaultValue: 'definition',
144144
},

lib/__tests__/help.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ describe('helpCommand', () => {
184184
expect.stringContaining(`${chalk.yellow.bold('-s, --source')} ${chalk.grey('Default: \'\'')}`),
185185
);
186186
expect(console.log).toHaveBeenCalledWith(
187-
expect.stringContaining('Type of replacement: usage or definition'),
187+
expect.stringContaining('The path to the source directory containing variable mappings.'),
188188
);
189189

190190
expect(console.log).toHaveBeenCalledWith(

lib/replace-variables.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const mapSCSStoCSS = require('../tokens/map-scss-to-css');
88
* @param {string[]} commandArgs - Command line arguments for replacing variables.
99
* @param {string} [commandArgs.filePath] - The path to the file in which variables should be replaced.
1010
* @param {string} [commandArgs.source] - The path to the source directory containing variable mappings.
11-
* @param {string} [commandArgs.replacementType] - The type of replacement ('usage' or 'all').
11+
* @param {string} [commandArgs.replacementType] - The type of replacement ('usage' or 'definition').
1212
* @param {string} [commandArgs.direction] - The direction of replacement ('forward' or 'backward').
1313
*/
1414
async function replaceVariablesCommand(commandArgs) {

0 commit comments

Comments
 (0)