Skip to content

Commit

Permalink
Tidy up
Browse files Browse the repository at this point in the history
- Remove unused packages
- Remove unused util functions
  • Loading branch information
Dom Harrington committed Apr 30, 2018
1 parent 9599b62 commit 1d191f6
Show file tree
Hide file tree
Showing 10 changed files with 12 additions and 932 deletions.
1 change: 0 additions & 1 deletion .npmignore

This file was deleted.

2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright © 2016 ReadMe.io
Copyright © 2018 ReadMe.io
Copyright © 2011-2012 Paul Vorbach

Permission is hereby granted, free of charge, to any person obtaining a copy of
Expand Down
21 changes: 0 additions & 21 deletions LICENSE.md

This file was deleted.

2 changes: 0 additions & 2 deletions api.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
var colors = require('colors');
var prompt = require('prompt-sync')();
var crypto = require('crypto');
var fs = require('fs');
var jsonfile = require('jsonfile');
var uslug = require('uslug');
var path = require('path');
var request = require('request');

Expand Down
3 changes: 2 additions & 1 deletion lib/docs.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
var utils = require('../utils');
var open = require('open');

exports.swagger = true;
exports.swaggerUrl = true;
Expand All @@ -14,7 +15,7 @@ exports.run = function(config, info) {
console.log("");
console.log("To use in ReadMe for documentation, follow the URL for setup information.");

utils.open(info.swaggerUrl + "?docs", info);
open(info.swaggerUrl + "?docs", info);

process.exit();
};
24 changes: 0 additions & 24 deletions lib/login.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
var jsonfile = require('jsonfile')
var open = require('open');

exports.swagger = false;
exports.login = false;
Expand All @@ -10,26 +9,3 @@ exports.run = function(config, info) {
console.log('Log in to your ReadMe account!');
console.log('');
};

exports.runOLD = function(config, info) {
if(info.args[1] == 'info') {
try {
var user = jsonfile.readFileSync(config.apiFile);
} catch(e) {
console.log("You aren't logged in");
}
open(config.host.url + '/info?token=' + user.token);

process.exit();
}
var apiFile = config.apiFile;
var settings = {
token: require('crypto').randomBytes(15).toString('hex'),
};

jsonfile.writeFileSync(apiFile, settings)

open(config.host.url + '/login?token=' + settings.token);

process.exit();
};
Loading

0 comments on commit 1d191f6

Please sign in to comment.