Skip to content
This repository was archived by the owner on Jan 25, 2024. It is now read-only.

Commit 36b2fbf

Browse files
committed
feat(cli): accept input / output default param
1 parent e8b98c1 commit 36b2fbf

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

src/cli.ts

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,15 @@ const optionDefinitions = [
2626
{ name: 'precision', alias: 'p', description: 'Set the precision for numbers.', type: Number },
2727
{ name: 'sass', alias: 'a', description: 'Treat input as indented syntax.', type: Boolean },
2828
{ name: 'version', alias: 'v', description: 'Display compiled versions.', type: Boolean },
29-
{ name: 'help', alias: 'h', description: 'Display this help message.', type: Boolean }
29+
{ name: 'help', alias: 'h', description: 'Display this help message.', type: Boolean },
30+
{
31+
name: 'files',
32+
description:
33+
'Specifies files for in order of [INPUT] [OUTPUT] \n' + `Do not need to explicitly specify --files args`,
34+
type: String,
35+
multiple: true,
36+
defaultOption: true
37+
}
3038
];
3139

3240
/**
@@ -130,6 +138,11 @@ const main = async () => {
130138
const { context } = await loadModule();
131139
const sassOption = buildSassOption(context, options);
132140

141+
const files: Array<string> = options.files || [];
142+
if (files.length > 2) {
143+
throw new Error(`Unexpected arguments provided, '${files.slice(2)}'`);
144+
}
145+
133146
sassOption.dispose();
134147
};
135148

0 commit comments

Comments
 (0)