lokhman / silex-assetic Goto Github PK
View Code? Open in Web Editor NEWSilex 2.0+ service provider for Assetic library
Home Page: https://lokhman.github.io/silex-assetic/
License: MIT License
Silex 2.0+ service provider for Assetic library
Home Page: https://lokhman.github.io/silex-assetic/
License: MIT License
Hi again ! :p
This time, I would like to load Font-awesome that I downloaded by Composer.
I successfully dump the css located in vendors, but it needs to load some font files (otf, eot, ttf, ...)
I looked for an Assetic solution and I found this link :
http://stackoverflow.com/questions/23443773/symfony2-assetic-css-font-icons
But, like you told me in #1, the output option in assets block do nothing.
Have you got an idea for loading them ?
Thanks ! :)
Hello !
I try to install your Assetic integration for Silex.
When I launch assetic:dump command, there are no errors, but no files are dumping.
Here the output of the command :
> php bin/console assetic:dump
Dumping all assets to /path_to_my_project/web.
Debug mode is on.
Here you can see how I configure Assetic for dumping AdminLTE less files located in vendors, following your documentation and Assetic's :
$app->register(new \Lokhman\Silex\Provider\AsseticServiceProvider(), array(
'assetic.options' => array(
'prefix' => '/',
'input_dir' => 'src/Resources/less',
'output_dir' => 'web',
'cache_dir' => 'var/cache/assetic',
'node' => '/usr/bin/node',
'filters' => array(
'sass' => array(
'bin' => '/usr/local/bin/sass'
),
'less' => array(
'bin' => '/usr/bin/less'
)
),
// Liste des assets à compiler
'assets' => array(
'backend_css' => array(
'inputs' => array(
'../vendor/almasaeed2010/adminlte/build/less/AdminLTE.less',
'../vendor/almasaeed2010/adminlte/build/less/skins/_all-skins.less'
),
'filters' => array(
'less'
),
'output' => array(
'css/backend/style.css'
)
)
)
)
));
Here you can see my exec console file :
#!/usr/bin/env php
<?php
require __DIR__ . '/../vendor/autoload.php';
use Silex\Application;
use Silex\Provider as Providers;
use Lokhman\Silex\Console\Console;
use Lokhman\Silex\Console\Command as Commands;
$app = new Application();
// On récupère les services qu'on a déjà register
require __DIR__ . '/../app/config/dev.php';
require __DIR__ . '/../app/config/assetic.php';
// Création d'un objet Console
$console = new Console($app);
// Ajout de la commande pour dump les assets
$console->add(new Commands\Assetic\DumpCommand());
$console->run();
Have you got an idea for how debug this ? Or an example of the provider configuration maybe ?
Thanks a lot for your help :)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.