| Total Complexity | 1 |
| Complexity/F | 0 |
| Lines of Code | 27 |
| Function Count | 0 |
| Duplicated Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | import projectDescriptor from '../../package.json'; |
||
| 2 | import program from 'commander'; |
||
| 3 | import preview from '../commands/preview'; |
||
| 4 | import convert from '../commands/convert'; |
||
| 5 | |||
| 6 | program |
||
| 7 | .version(projectDescriptor.version); |
||
| 8 | |||
| 9 | program |
||
| 10 | .command('preview <file>') |
||
| 11 | .description('Preview the ICLS file colors') |
||
| 12 | .option('-k, -key <key>', 'Preview for the given key') |
||
| 13 | .action(preview); |
||
| 14 | |||
| 15 | program |
||
| 16 | .command('convert <file>') |
||
| 17 | .description('Convert the given ICLS to the requested format') |
||
| 18 | .option('-t , --template <file>', 'Define the css file template', './src/templates/tpl-%s.css') |
||
| 19 | .option('-f , --format <format>', 'Define the output format', 'prism') |
||
| 20 | .action(convert); |
||
| 21 | |||
| 22 | program.parse(process.argv); |
||
| 23 | |||
| 24 | if (!process.argv.slice(2).length) { |
||
| 25 | program.outputHelp(); |
||
| 26 | process.exit(1); |
||
|
1 ignored issue
–
show
|
|||
| 27 | } |
||
| 28 | |||
| 29 |