apnet / html5shiv
Html5Shiv for AsseticImporter
Installs: 990
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 3
Forks: 0
Open Issues: 0
Language:JavaScript
Requires
Requires (Dev)
- afarkas/html5shiv: ~3.7,<4.0
- apnet/coding-standard: ~2.0
- apnet/functional-test-bundle: ~1.2
- covex-nn/twig-callable-bridge-bundle: ~1.1
- knplabs/knp-markdown-bundle: ~1.3
- phpunit/phpunit: ~4.0
- symfony/monolog-bundle: ~2.3
- symfony/symfony: ~2.3|~3.0
This package is not auto-updated.
Last update: 2022-02-01 12:34:23 UTC
README
Installation
Add requirements to composer.json:
{ "require" : { "apnet/html5shiv" : "~3.7" } }
Configurations
Register ApnetAsseticImporterBundle
bundle in the AppKernel.php
file
// ...other bundles ... $bundles[] = new Apnet\AsseticImporterBundle\ApnetAsseticImporterBundle();
Add Html5Shiv importer to services.yml
services: apnet.assetic.importer.html5shiv: parent: assetic.importer_path arguments: - %kernel.root_dir%/../vendor/apnet/html5shiv/app/Resources/assets/dist - html5shiv tags: - { name: apnet.assetic.config_mapper }
Twig
To include Html5Shiv into Twig template use imported_asset function:
<!--[if lt IE 9]><script src="{{ imported_asset('html5shiv/html5shiv.min.js') }}"></script><![endif]-->
or/and
<!--[if lt IE 9]><script src="{{ imported_asset('html5shiv/html5shiv-print.min.js') }}"></script><![endif]-->