Skip to content

Commit

Permalink
Updated CreateLayoutCommand.php
Browse files Browse the repository at this point in the history
  • Loading branch information
rougin committed Nov 13, 2015
1 parent 1a9e516 commit 6f6b465
Showing 1 changed file with 9 additions and 16 deletions.
25 changes: 9 additions & 16 deletions src/Commands/CreateLayoutCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,19 +60,16 @@ protected function execute(InputInterface $input, OutputInterface $output)
{
$filePath = APPPATH.'views/layout';

$data = [];
$data['bootstrapContainer'] = '';
$data['scripts'] = [];
$data['styleSheets'] = [
'//maxcdn.bootstrapcdn.com/font-awesome/'.
'4.2.0/css/font-awesome.min.css'
$data = [
'bootstrapContainer' => '',
'scripts' => [],
'styleSheets' => [
'//maxcdn.bootstrapcdn.com/font-awesome/'.
'4.2.0/css/font-awesome.min.css'
]
];

$fontAwesome = ! is_dir('bower_components/font-awesome')
? system('bower install font-awesome')
: TRUE;

if ($fontAwesome) {
if ( ! is_dir('bower_components/font-awesome') && system('bower install font-awesome')) {
$data['styleSheets'][0] = '<?php echo base_url(\''.
'bower_components/font-awesome/css/'.
'font-awesome.min.css'
Expand All @@ -90,11 +87,7 @@ protected function execute(InputInterface $input, OutputInterface $output)

$jquery = 'https://code.jquery.com/jquery-2.1.1.min.js';

$bower = ! is_dir('bower_components/bootstrap')
? system('bower install bootstrap')
: TRUE;

if ($bower) {
if ( ! is_dir('bower_components/bootstrap') && system('bower install bootstrap')) {
$bootstrapCss = '<?php echo base_url(\''.
'bower_components/bootstrap/dist/css/bootstrap.min.css'
. '\'); ?>';
Expand Down

0 comments on commit 6f6b465

Please sign in to comment.