Comparing version 1.1.4 to 1.1.5
@@ -6,2 +6,6 @@ # Change Log | ||
<a name="current-release"></a> | ||
# Version 1.1.5 (Sun, 21 May 2017 15:02:04 GMT) | ||
* [4f22c1f](https://github.com/nknapp/thought/commit/4f22c1f) Fixed "thought init" process - Nils Knappmeier | ||
# Version 1.1.4 (Sun, 21 May 2017 12:35:54 GMT) | ||
@@ -8,0 +12,0 @@ |
@@ -16,3 +16,5 @@ /*! | ||
var packageJson | ||
return qfs.read('package.json') | ||
return checkPackageJsonInGit() | ||
.then(() => npmInstallThought()) | ||
.then(() => qfs.read('package.json')) | ||
.then(function (contents) { | ||
@@ -25,5 +27,2 @@ packageJson = JSON.parse(contents) | ||
.then(function () { | ||
return checkPackageJsonInGit() | ||
}) | ||
.then(function () { | ||
packageJson.scripts = packageJson.scripts || {} | ||
@@ -40,9 +39,6 @@ packageJson.scripts.thought = 'thought run -a' | ||
.then(function () { | ||
return exec('npm', ['install', '--save-dev', 'thought']) | ||
}) | ||
.then(function () { | ||
return exec('git', ['commit', 'package.json', '-m', '[Thought] Added scripts to run thought on version-bumps']) | ||
}) | ||
.spread(function (stderr, stdout) { | ||
debug('git commit package.json...', 'stdout', stdout, 'stderr', stderr) | ||
.then(function (stdio) { | ||
debug('git commit package.json...', 'stdout', stdio[0], 'stderr', stdio[1]) | ||
// eslint-disable-next-line no-console | ||
@@ -71,1 +67,18 @@ console.log('\nI have committed a new package.json. Please verify the changes made to the file!') | ||
} | ||
function npmInstallThought () { | ||
return new Promise((resolve, reject) => { | ||
var cp = require('child_process') | ||
var child = cp.spawn('npm', ['install', '--save-dev', 'thought'], { | ||
stdio: 'inherit' | ||
}) | ||
child.on('error', reject) | ||
child.on('exit', (code) => { | ||
if (code === 0) { | ||
resolve() | ||
} else { | ||
reject(new Error('Process exited with code ' + code)) | ||
} | ||
}) | ||
}) | ||
} |
{ | ||
"name": "thought", | ||
"version": "1.1.4", | ||
"version": "1.1.5", | ||
"description": "A customizable documentation generator for github projects", | ||
@@ -5,0 +5,0 @@ "repository": { |
58023
976
3