mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
react app
This commit is contained in:
36
react-app/node_modules/repeating/cli.js
generated
vendored
Executable file
36
react-app/node_modules/repeating/cli.js
generated
vendored
Executable file
@@ -0,0 +1,36 @@
|
||||
#!/usr/bin/env node
|
||||
'use strict';
|
||||
var pkg = require('./package.json');
|
||||
var repeating = require('./');
|
||||
var argv = process.argv.slice(2);
|
||||
|
||||
function help() {
|
||||
console.log([
|
||||
'',
|
||||
' ' + pkg.description,
|
||||
'',
|
||||
' Usage',
|
||||
' $ repeating <string> <count>',
|
||||
'',
|
||||
' Example',
|
||||
' $ repeating \'unicorn \' 2',
|
||||
' unicorn unicorn'
|
||||
].join('\n'));
|
||||
}
|
||||
|
||||
if (process.argv.indexOf('--help') !== -1) {
|
||||
help();
|
||||
return;
|
||||
}
|
||||
|
||||
if (process.argv.indexOf('--version') !== -1) {
|
||||
console.log(pkg.version);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!argv[1]) {
|
||||
console.error('You have to define how many times to repeat the string.');
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
console.log(repeating(argv[0], Number(argv[1])));
|
Reference in New Issue
Block a user