Skip to content

Commit

Permalink
v0.1.5 - Bower support
Browse files Browse the repository at this point in the history
  • Loading branch information
Blake Callens committed Aug 18, 2014
1 parent 9998fbb commit 64d6dd6
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
21 changes: 21 additions & 0 deletions lib/InstallService.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ InstallService.prototype.install = function(directory) {
description: 'database name',
default: 'pencilblue',
type: 'string'
},
bower: {
description: 'Do you want to install Bower components?',
default: 'y/N',
type: 'string'
}
}
};
Expand All @@ -53,8 +58,24 @@ InstallService.prototype.install = function(directory) {
console.log('Installing PencilBlue to ' + directory + '/...');
shell.exec('git clone https://github.com/pencilblue/pencilblue.git ' + directory);
shell.cd(directory);

console.log('Installing Node modules...');
shell.exec('sudo npm install');

if(siteSettings.bower.toLowerCase() === 'y' || siteSettings.bower.toLowerCase() === 'yes') {
if(shell.which('bower')) {
console.log('Retrieving Bower components...');
shell.exec('bower install');
}
else {
console.log('Installing Bower...');
shell.exec('sudo npm install bower');

console.log('Retrieving Bower components...');
shell.exec('node_modules/.bin/bower install');
}
}

console.log('Creating config.json...');

fs.readFile(process.cwd() + '/sample.config.json', function(err, data) {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "pencilblue-cli",
"description": "A command line interface for PencilBlue.",
"version": "0.1.4",
"version": "0.1.5",
"homepage": "https://pencilblue.org",
"author": {
"name": "pencilblue",
Expand Down

0 comments on commit 64d6dd6

Please sign in to comment.