2017 © Pedro Peláez
 

library bootstrap

Bootstrap for AsseticImporter

image

apnet/bootstrap

Bootstrap for AsseticImporter

  • Friday, July 8, 2016
  • by covex-nn
  • Repository
  • 0 Watchers
  • 0 Stars
  • 743 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 5 Versions
  • 1 % Grown

The README.md

Bootstrap Assets Importer

Installation

Add requirements to composer.json:, (*1)

``` json { "require" : { "apnet/bootstrap" : "~3.1,<4.0" } }, (*2)


Configurations -------------- Register `ApnetAsseticImporterBundle` bundle in the `AppKernel.php` file ``` php // ...other bundles ... $bundles[] = new Apnet\AsseticImporterBundle\ApnetAsseticImporterBundle();

Add Bootstrap importer to services.yml, (*3)

``` yml services: # bootstrap3 default css apnet.assetic.importer.bootstrap_css: parent: assetic.importer_path arguments: - %kernel.root_dir%/../vendor/apnet/bootstrap/app/Resources/assets/stylesheets - bootstrap tags: - { name: apnet.assetic.config_mapper } # bootstrap3 js apnet.assetic.importer.bootstrap_js: parent: assetic.importer_path arguments: - %kernel.root_dir%/../vendor/apnet/bootstrap/app/Resources/assets/javascripts - bootstrap tags: - { name: apnet.assetic.config_mapper }, (*4)


Twig ---- To include Bootstrap into Twig template use **imported_asset** function: ``` html <link href="{{ imported_asset('bootstrap/bootstrap.min.css') }}" rel="stylesheet" type="text/css" />

and, (*5)

html <script type="text/javascript" src="{{ imported_asset('bootstrap/bootstrap.min.js') }}"></script>, (*6)

The Versions