Permalink
Browse files

Removed component-open

  • Loading branch information...
1 parent 8bf2198 commit e2b83876eb7c1017a6de77dbd8136ab251a13281 @trevorgerhardt trevorgerhardt committed Jun 5, 2014
Showing with 0 additions and 57 deletions.
  1. +0 −56 bin/component-open
  2. +0 −1 package.json
View
@@ -1,56 +0,0 @@
-#!/usr/bin/env node
-
-var program = require('commander');
-
-program.on('--help', function(){
- console.log(' Opens the relevant webpage in your favorite browser.')
- console.log();
- console.log(' Commands:');
- console.log();
- console.log(' open opens http://component.io');
- console.log(' open guide opens the guide to Component');
- console.log(' open troubleshooting opens the troubleshooting docs');
- console.log(' open help opens the component(1) API docs');
- console.log(' open help <command> opens the docs to a specific component(1) command');
- console.log(' open . opens the current component\'s github page');
- console.log(' open <repo> opens <repo>\'s github page');
- console.log();
- process.exit();
-});
-
-program.parse(process.argv);
-
-var fatal = require('component-consoler').fatal;
-var resolve = require('path').resolve;
-var open = require('open');
-
-var args = program.args;
-if (!args.length) return open('http://component.io/');
-
-var arg = args[0];
-
-if (arg === 'guide') return open('https://github.com/component/guide');
-
-if (arg === 'troubleshooting') return open('https://github.com/component/guide/blob/master/component/troubleshooting.md');
-
-if (arg === 'help') {
- var uri = 'https://github.com/component/guide/blob/master/component/api.md';
- if (args[1]) uri += '#' + args[1];
- open(uri);
- return;
-}
-
-if (arg === '.') {
- // to do: check if this file actually exists
- var json;
- try {
- json = require(resolve('component.json'));
- } catch (err) {
- fatal('error opening the component.json in this directory');
- }
- arg = json.repository || json.repo;
- if (!arg) fatal('this component.json does not have a .repository field');
-}
-
-if (!~arg.indexOf('/')) fatal('invalid repository name');
-open('https://github.com/' + arg);
View
@@ -47,7 +47,6 @@
"component-install": "bin/component-install",
"component-link": "bin/component-link",
"component-ls": "bin/component-ls",
- "component-open": "bin/component-open",
"component-outdated": "bin/component-outdated",
"component-pin": "bin/component-pin",
"component-search": "bin/component-search",

0 comments on commit e2b8387

Please sign in to comment.