Built motion from commit 6a09e18b.|2.6.11
[motion2.git] / legacy-libs / grpc-cloned / node_modules / window-size / cli.js
diff --git a/legacy-libs/grpc-cloned/node_modules/window-size/cli.js b/legacy-libs/grpc-cloned/node_modules/window-size/cli.js
new file mode 100644 (file)
index 0000000..dd8d0e5
--- /dev/null
@@ -0,0 +1,30 @@
+#!/usr/bin/env node
+'use strict';
+var helpText = ['Usage',
+'  $ window-size',
+'',
+'Example',
+'  $ window-size',
+'  height: 40 ',
+'  width : 145',
+''].join('\n');
+
+function showSize () {
+  var size = require('./');
+  console.log('height: ' + size.height);
+  console.log('width : ' + size.width);
+}
+
+if (process.argv.length > 2) {
+  switch (process.argv[2]) {
+    case 'help':
+    case '--help':
+    case '-h':
+      console.log(helpText);
+      break;
+    default:
+      showSize();
+  }
+} else {
+  showSize();
+}