neilime / zf2-assets-bundle

AssetsBundle is a module for Zend Framework 2 allowing asset managment (bundling & caching)
https://neilime.github.io/zf2-assets-bundle/
MIT License
33 stars 20 forks source link

Problems in files without extension #16

Closed mariomka closed 10 years ago

mariomka commented 10 years ago

I tried to add Google Maps Javascript API 3: http://maps.googleapis.com/maps/api/js?v=3.13&sensor=false

But this file is not added because It has not extension.

The problem is in this file: \src\AssetsBundle\View\Strategy\ViewHelperStrategy.php

switch($sExtension){
        case 'js':
            $this->getRenderer()->plugin('InlineScript')->appendFile($sPath);
            break;
        case 'css':
            $this->getRenderer()->plugin('HeadLink')->appendStylesheet($sPath,'all');
            break;
    }

I have found a temporary solution, add &.js at the end of the url as: http://maps.googleapis.com/maps/api/js?v=3.13&sensor=false&.js