Giter VIP home page Giter VIP logo

silex-assetic's People

Contributors

lokhman avatar

Watchers

 avatar  avatar

silex-assetic's Issues

Dump Font files

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 ! :)

Assetic configuration

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 :)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.