PHP code example of vesselinv / fuel-sprockets

1. Go to this page and download the library: Download vesselinv/fuel-sprockets library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

vesselinv / fuel-sprockets example snippets


    return array(
      'asset_root_dir'    => APPPATH . 'assets/',
      'asset_compile_dir' => DOCROOT . 'assets/',
      'cache_dir'         => APPPATH . 'cache/sprockets/',
      'js_dir'            => 'js/',
      'css_dir'           => 'css/',
      'img_dir'           => 'img/',
      'base_url'          => \Uri::base(false),
      'force_minify'      => false,
      'coffeescript' => array(
        'bare'   => true,
        'header' => '\/\/ Generated by CoffeeScript 1.3.1\n',
      ),
    );

# How to Use  #

Inside your views, simply invoke your bundle file just as you would with `Asset`

       echo Sprockets::js('application.js'); 
 echo Sprockets::css('application.scss');