Download the PHP package apnet/assetic-importer-bundle without Composer
On this page you can find all versions of the php package apnet/assetic-importer-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package assetic-importer-bundle
Assetic Importer Bundle
The main purpose of a Bundle
is to exclude cssrewrite
filter and to bypass known issue
that causes the cssrewrite
to fail when using the @AcmeFooBundle
syntax for CSS Stylesheets.
Bundle
allows you to import files from non-public directories via assetic
directly into routing
.
These files can either be a result of an external program
, or created on the fly from Symfony
.
Bundle
и assetic
keep track of changes to files automatically on every request.
Installation
Add requirements to composer.json:
Register the bundle
Register the bundle in the AppKernel.php
file
Configuration
Let's assume that you have two directories inside app/Resources
:
app/Resources/simple_dir
withstyle1.css
fileapp/Resources/compass_dir
withconfig.rb
and all other compass-project files (e.g.sass/style2.scss
andstylesheets/style2.css
)
Then add the configuration into your config.yml
After these changes two css files will be accessible via /app_dev.php
/app_dev.php/example1/style1.css
/app_dev.php/example2/stylesheets/style2.css
. Also all files insidecss_dir
,images_dir
,javascripts_dir
,fonts_dir
will ba available.sass_dir
directory contents will be private.
All files will be dumped with assetic:dump
command.
Twig
To include your CSS into Twig template use imported_asset function:
Assetic Watcher Bundle
Actualy there are two bundles inside apnet/assetic-importer-bundle
:
- Apnet\AsseticImporterBundle
- Apnet\AsseticWatcherBundle
Watcher is a tool, that could be used with dev
environment to compile
compass project without any external file watchers or IDE.
- Of course Apache user needs write permissions to the
compass_dir/stylesheets
directory
AsseticWatcherBundle
is disabled by default.
Configuration
First, to enable Assetic Watcher add these lines to config_dev.yml
And second, add watcher
parameter to imported asset configuration in config.yml
All versions of assetic-importer-bundle with dependencies
doctrine/lexer Version ~1.0
symfony/assetic-bundle Version ~2.3|~3.0
symfony/twig-bundle Version ~2.3|~3.0
symfony/config Version ~2.3|~3.0
symfony/dependency-injection Version ~2.3|~3.0
symfony/filesystem Version ~2.3|~3.0
symfony/finder Version ~2.3|~3.0
symfony/http-kernel Version ~2.3|~3.0
symfony/process Version ~2.3|~3.0
symfony/yaml Version ~2.3|~3.0
twig/twig Version ~1.12