Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Fuel Sprockets
  • A php implementation of the Asset Pipeline, tailored for Fuel. Aimed at easier and better asset management, asset bundling and on-the-fly compiling (sass, less, coffee) and minification.

  • Thank you for this - set up easily and works well.

    I've got a two requests:
    I use bootstrap.less and very rarely change that file, but change the other ones it references.  Would be nice if, when in the development environment, it checked all files to see if they'd changed, if calling bootstrap.less file.

    Also, I use \Fuel\Theme's asset support, and it would be awesome if Sprockets could be supported in the same way.
  • Thanks for the feedback.

    Currently, with Scss and Less stylesheets, the package doesn't check any @import-ed partials whether they've changed or not. It'll recompile them only when the main file changes. Feel free to open an issue on github and I'll see what I can do to accommodate this.

    As for Themes, you can simply forge a Sprockets instance with a separate config that will point the asset_root_directory option to where your theme assets are located, and the asset_compile_dir to where you'd like the bundles output. So something along those lines should work for you:



    $config = array(
    'asset_root_dir' => path_to_theme_assets,
    'asset_compile_dir => path_to_bundle_output,
    // additional options to fit your setup
    );
    $sprockets = Sprockets::forge("theme-name", $config);

    // Later on inside your theme template/layout
    $sprockets->js("app.js");
    // or
    $sprockets->css("app.less");

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion