Hi! I fixed some code for you! #5

Open
wants to merge 3 commits into
from
View
@@ -37,8 +37,8 @@ withConfig(function (config) {
}
else {
var dir = gitDir(process.cwd());
- if (!path.existsSync(dir + '/.travis.yml')
- && path.existsSync(dir + '/package.json')) {
+ if (!fs.existsSync(dir + '/.travis.yml')
+ && fs.existsSync(dir + '/package.json')) {
var pkg = JSON.parse(fs.readFileSync(dir + '/package.json'));
var sv = (pkg.engines || {}).node || '>=0.4';
View
@@ -4,7 +4,7 @@ var mkdirp = require('mkdirp');
var tty = require('tty');
function echo (mode) {
- tty.setRawMode(!mode);
+ process.stdin.setRawMode(!mode);
}
module.exports = function (cb) {
@@ -20,7 +20,7 @@ module.exports = function (cb) {
})
}
- path.exists(file, function (ex) {
+ fs.exists(file, function (ex) {
if (!ex) prompt(function (vars) {
fs.writeFile(file, JSON.stringify(vars), function (err) {
if (err) console.error(err)
View
@@ -4,6 +4,6 @@ module.exports = function (dir) {
var ps = dir.split('/');
for (var i = ps.length; i > 0; i--) {
var p = ps.slice(0, i).join('/');
- if (path.existsSync(p + '/.git')) return p;
+ if (fs.existsSync(p + '/.git')) return p;
}
};