2017 © Pedro Peláez
 

library javascriptpackerbundle

Dean Edwards Packer, usable from Symfony2

image

icedream/javascriptpackerbundle

Dean Edwards Packer, usable from Symfony2

  • Sunday, August 3, 2014
  • by icedream
  • Repository
  • 1 Watchers
  • 0 Stars
  • 24 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

JavaScript Packer Bundle for Symfony2

This bundle allows you to use the PHP port of Dean Edward's Packer to compress JavaScripts, (*1)

Beta disclaimer

Feel free to use this bundle but keep in mind it is still in beta stage and needs a bit of testing. If you see any issues with this bundle, please give feedback using the GitHub issue tracker., (*2)

Installation/Usage

  1. Install via composer:, (*3)

    composer require icedream/javascriptpackerbundle:~1.0@beta
    
  2. Download the PHP port of Dean Edward's packer. The recommended way is to use the suggestion of this package and install meenie/javascript-packer via composer., (*4)

    composer require meenie/javascript-packer:~1.1
    
  3. Add bundle to the application kernel (app/AppKernel.php):, (*5)

    <?php
    use Symfony\Component\HttpKernel\Kernel;
    use Symfony\Component\Config\Loader\LoaderInterface;
    
    class AppKernel extends Kernel
    {
        public function registerBundles()
        {
            $bundles = array(
                // ...
                new Icedream\JavaScriptPackerBundle\JavaScriptPackerBundle(),
                );
            // ...
        }
    }
    
  4. Configure the bundle in app/config/config.yml:, (*6)

    # Assetic Configuration
    assetic:
        filters:
            jspacker:
                resource: %kernel.root_dir%/../vendor/icedream/javascriptpackerbundle/Icedream/JavaScriptPackerBundle/Resources/config/services.xml
                # If you did not use the composer method to download the Packer script, uncomment this and point the variable to the full path of class.JavaScriptPacker.php
                #packer: %kernel.root_dir%/../vendor/meenie/javascript-packer/class.JavaScriptPacker.php
    
  5. Now you can use the filter as needed., (*7)

    {% javascripts '@AcmeDemoBundle/Resources/public/js/somescript.js' filter='jspacker' %}
    <script type="text/javascript" src="{{ asset_url }}"></script>
    {% endjavascripts %}
    

License

This bundle is licensed under the MIT license. See LICENSE.txt for more information., (*8)

The Versions

03/08 2014

dev-master

9999999-dev

Dean Edwards Packer, usable from Symfony2

  Sources   Download

MIT

The Requires

 

15/06 2014

1.0.0

1.0.0.0

Dean Edwards Packer, usable from Symfony2

  Sources   Download

MIT

The Requires