Skip to content

Commit

Permalink
Move CLI instruction to post install
Browse files Browse the repository at this point in the history
fix also build error
  • Loading branch information
hypery2k committed Aug 7, 2015
1 parent 8c5aa56 commit 8db942c
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 18 deletions.
13 changes: 0 additions & 13 deletions install.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,19 +132,6 @@ whichDeferred.promise
fs.chmodSync(libPath + '/galen/galen.bat', '755');

console.log('Done. galen binary available at', location);

if (process.platform === 'darwin') {
console.info('\n\nTo \x1b[4menable CLI tab autocompletion\x1b[0m run: \n' +
' \x1b[7mgalen completion >> ~/.profile\x1b[0m ' +
'\n\n');
}
if (process.platform === 'linux') {
console.info('\n\nTo \x1b[4menable CLI tab autocompletion\x1b[0m run: \n' +
' \x1b[7mgalen completion >> ~/.~/.bashrc\x1b[0m \n' +
'or\n' +
' \x1b[7mgalen completion >> ~/.~/.zshrc\x1b[0m ' +
'\n\n');
}
exit(0);
})
.fail(function (err) {
Expand Down
3 changes: 1 addition & 2 deletions lib/helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ try {
* The version of Galen installed by this package.
* @type {number}
*/
var pkg = require('../package.json');
exports.version = pkg._galenVersion;
exports.version = require('../package.json')._galenVersion;


/**
Expand Down
4 changes: 1 addition & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,10 @@
"TDD",
"BDD"
],
"files": [
"lib/*.js"
],
"author": "Martin Reinhardt",
"scripts": {
"install": "node install.js",
"postinstall": "node postinstall.js",
"test": "./node_modules/.bin/nodeunit --reporter=minimal test/tests.js",
"pretest": "./node_modules/jshint/bin/jshint lib",
"coverage": "istanbul -- cover ./node_modules/.bin/nodeunit test/tests.js && istanbul-coveralls --no-rm"
Expand Down
13 changes: 13 additions & 0 deletions postinstall.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
'use strict';
if (process.platform === 'darwin') {
console.info('\n\nTo \x1b[4menable CLI tab autocompletion\x1b[0m run: \n' +
' \x1b[7mgalen completion >> ~/.profile\x1b[0m ' +
'\n\n');
}
if (process.platform === 'linux') {
console.info('\n\nTo \x1b[4menable CLI tab autocompletion\x1b[0m run: \n' +
' \x1b[7mgalen completion >> ~/.~/.bashrc\x1b[0m \n' +
'or\n' +
' \x1b[7mgalen completion >> ~/.~/.zshrc\x1b[0m ' +
'\n\n');
}

0 comments on commit 8db942c

Please sign in to comment.