https://github.com/hackzilla/bootstrap-bundle
Bootstrap Helper Bundle for Symfony2
https://github.com/hackzilla/bootstrap-bundle
Last synced: 7 months ago
JSON representation
Bootstrap Helper Bundle for Symfony2
- Host: GitHub
- URL: https://github.com/hackzilla/bootstrap-bundle
- Owner: hackzilla
- Created: 2014-04-19T09:53:28.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2015-01-12T16:51:43.000Z (about 11 years ago)
- Last Synced: 2025-01-19T20:51:57.580Z (about 1 year ago)
- Language: CSS
- Homepage: http://hackzilla.org
- Size: 234 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Boostrap Helper Bundle for Symfony2
===================================
Requirements
------------
* java
* nodejs (npm & less)
* cssembed [https://github.com/nzakas/cssembed/downloads]
* yuicompressor [https://github.com/yui/yuicompressor/downloads]
System Setup
------------
For ubuntu, run the following commands to install necessary dependencies.
```bash
apt-get install java-common nodejs npm
npm install -g less
```
Installation
------------
Add HackzillaBootstrapBundle in your composer.json:
```json
{
"require": {
"hackzilla/bootstrap-bundle": "~0.2",
}
}
```
Now tell composer to download the bundle by running the command:
``` bash
$ php composer.phar update hackzilla/bootstrap-bundle
```
Composer will install the bundle into your project's `vendor/hackzilla` directory.
### Step 2: Enable the bundle
Enable the bundle in the kernel:
``` php
.jar
cssrewrite: ~
yui_js:
jar: %kernel.root_dir%/Resources/java/yuicompressor-.jar
less:
node: /usr/local/bin/node
node_paths: [/usr/local/lib/node_modules]
apply_to: "\.less$"
assets:
bootstrap_js:
inputs:
- '%kernel.root_dir%/../vendor/twbs/bootstrap/js/affix.js'
- '%kernel.root_dir%/../vendor/twbs/bootstrap/js/alert.js'
- '%kernel.root_dir%/../vendor/twbs/bootstrap/js/button.js'
- '%kernel.root_dir%/../vendor/twbs/bootstrap/js/carousel.js'
- '%kernel.root_dir%/../vendor/twbs/bootstrap/js/collapse.js'
- '%kernel.root_dir%/../vendor/twbs/bootstrap/js/dropdown.js'
- '%kernel.root_dir%/../vendor/twbs/bootstrap/js/modal.js'
- '%kernel.root_dir%/../vendor/twbs/bootstrap/js/tooltip.js'
- '%kernel.root_dir%/../vendor/twbs/bootstrap/js/popover.js'
- '%kernel.root_dir%/../vendor/twbs/bootstrap/js/scrollspy.js'
- '%kernel.root_dir%/../vendor/twbs/bootstrap/js/tab.js'
- '%kernel.root_dir%/../vendor/twbs/bootstrap/js/transition.js'
filters: [?yui_js]
bootstrap_less:
inputs:
- '@HackzillaBootstrapBundle/Resources/less/compile.less'
filters: [less,cssembed]
```
- [Example base.html.twig](Resources/doc/base.html.twig)
Fonts
-----
in web directory create symlink to the bootstrap fonts
```ln -s ../vendor/twbs/bootstrap/fonts```
(Re)Generate bootstrap.js and bootstrap.css
-------------------------------------------
```
app/console assetic:dump --env=prod --no-debug;
app/console assetic:dump --env=dev;
```
Advanced usage
==============
Copy @HackzillaBootstrapBundle/Resources/less/compile.less and @HackzillaBootstrapBundle/Resources/less/variables.less to your own folder resources folder, and update bootstrap_less section in your config.
~~Alternatively copy @HackzillaBootstrapBundle/Resources/less/variables.less to /app/Resources/HackzillaBootstrapBundle/less/variables.less~~