Skip to content

Commit

Permalink
Merge pull request #157 from Kunstmaan/feature/move-bower-to-generator
Browse files Browse the repository at this point in the history
Move bower configs to the generator and update+fix the bower dependencies
  • Loading branch information
Roderik van der Veer committed Apr 17, 2014
2 parents c57c1a5 + b7030c9 commit 548432f
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 2 deletions.
10 changes: 10 additions & 0 deletions Generator/LayoutGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ public function generate(BundleInterface $bundle, $rootDir)
$this->rootDir = $rootDir;

$this->generateGruntFiles();
$this->generateBowerFiles();
$this->generateAssets();
$this->generateTemplate();
}
Expand All @@ -45,6 +46,15 @@ private function generateGruntFiles()
$this->assistant->writeLine('Generating grunt configuration : <info>OK</info>');
}

/**
* Generate the bower configuration files.
*/
private function generateBowerFiles()
{
$this->renderFiles($this->skeletonDir.'/bower/', $this->rootDir, array('bundle' => $this->bundle), true);
$this->assistant->writeLine('Generating bower configuration : <info>OK</info>');
}

/**
* Generate the public asset files.
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"directory": "web/vendor/"
}
17 changes: 17 additions & 0 deletions Resources/SensioGeneratorBundle/skeleton/layout/bower/bower.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"name": "{{ bundle.getName() }}",
"version": "1.0.0",
"dependencies": {
"sass-bootstrap": "~3.0",
"bourbon": "~3.1",
"jquery": "~1.11",
"cupcake": "~1.6",
"html5shiv": "~3.7",
"socialite-js": "v2.0",
"flexslider": "latest",
"fitvids": "~1.1",
"svgeezy": "~1.0",
"jquery-placeholder": "~2.0",
"fancybox": "~2.1"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -130,11 +130,11 @@ module.exports = function (grunt) {
},
files: {
'web/frontend/.temp/js/vendors.min.js': [
'web/vendor/jquery/jquery.js',
'web/vendor/jquery/dist/jquery.js',
'web/vendor/sass-bootstrap/js/modal.js',
'web/vendor/flexslider/jquery.flexslider.js',
'web/vendor/fitvids/jquery.fitvids.js',
'web/vendor/socialite/socialite.js',
'web/vendor/socialite-js/socialite.js',
'web/vendor/fancybox/source/jquery.fancybox.js',
'web/vendor/cupcake/js/navigation/jquery.navigation.js',
]
Expand Down

0 comments on commit 548432f

Please sign in to comment.