Git Product home page Git Product logo

fuel-sprockets's People

Contributors

andyjwwhite avatar crankeye avatar vesselinv avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

fuel-sprockets's Issues

Bump version to 1.4, and Tag

After merging the last change I would consider bumping the version to 1.4 so users who installed via composer with the require in the documentation will get the latest version which is on master.

Conf suggestion for background-images:url?

Hello again

In Sprockets, you don't even talk about images, background-images called in Css/Sass/Less files.

Because if you do css images, there is only one configuration possible. It's making the asset_root_dir = asset_compile_dir.

For example:
my css images are in /assets/img
my css are in /assets/css, with some background-image:url('../img/image.jpg');
asset_root_dir = /assets/
then my asset_compile_dir must be /assets/, if not, the compiled css won't find the images.

Did I miss something in the configuration? Is it the only way to set my compile dir?

This is not a big issue, but since the config lets you finetune the directories, I guess it would be nice to allow this in this case.

Maybe I should not use relative url (../img/), and instead use absolute path (/assets/img/)?

Thanks a lot and keep up the good work.

Parsing Error! (with PHP 5.3)

capture decran 2013-05-20 a 23 48 39

I discover the error its because Iam on 5.3, it works in 5.4 (array value by key on a function), do you think you can fix for work in 5.3 ?

Usage of less mixins (like less hat)

I have the following problem by using "less hat" (http://lesshat.madebysource.com/) and sprockets.

I justed required the lesshat.less file inside my main.less:
//= require lesshat.less

And get the following error:
Twig_Error_Runtime [ Error ]:
An exception has been thrown during the rendering of a template ("parse error: failed at var r="@{arguments}";return r=r.replace(/^\[|\]$/g,"")})()); ` line: 97") in "partials/html_header.twig" at line 7.

If I remove the require, everything works fine. I don't think its a problem of lesshat, since the same file worked with fuelphp and less before I used sprockets!

Do you have any ideas why it doesn't work?

Ability to set base_url or root_url for asset tag render

When rending the tags for js/css it currently just uses the asset_path which works locally, but it would be very useful to have the ability to use the base_url or root_path prepended to the asset_path.

So currently it would output something like:
/assets/js/application.js

But this feature would be a new config and when set you could do:
http://yoursite.com/assets/js/application.js

For me I use a CDN on production and made up hostname on my local dev.

It looks like this line handles the generating the asset tags, however this class doesn't have access to the config as far as I can tell:
https://github.com/vesselinv/fuel-sprockets/blob/master/classes/sprockets/cache.php#L172

Error with Directive Parser

Hello

Thanks a lot for this great package, it is working well on my Fuel 1.6 except the directive parser.

I just want to do a simple require.

Here is my config:

return array(
  'asset_root_dir'             => DOCROOT . 'assets/',
  'asset_compile_dir'       => DOCROOT . 'compile/cache/',
  'cache_dir'                     => DOCROOT . 'compile/sprockets/',
  'js_dir'                            => 'js/',
  'css_dir'                         => 'css/',
  'force_minify'                 => false
);

My two JS files are in the assets/js/folder:
assets/js/application.js
assets/js/common.js

I have
echo Sprockets::js('application.js'); in my Fuel template
And
//= require common.js in the application.js file.

Here is the error:

Fuel\Core\PhpErrorException [ Warning ]: file_get_contents(/myroot/public/assets/js/common.js ): failed to open stream: No such file or directory
PKGPATH/sprockets/classes/sprockets/file.php @ line 38

It says it doesn't find the common.js that is in the sane directory, I don't understand what is happening. It's my local server, all folders are writable.

Any clue?
Kind regards

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.