Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

This package should not manage assets, maybe? #2

Open
younes0 opened this issue Jul 30, 2015 · 6 comments
Open

This package should not manage assets, maybe? #2

younes0 opened this issue Jul 30, 2015 · 6 comments

Comments

@younes0
Copy link

younes0 commented Jul 30, 2015

Many of laravel developers like me use Elixir or Gulp or Grunt instead of PHP for assets management & compilation.

@RobinRadic
Copy link
Member

I have 2 themes now that use bower/grunt combination. I use the Asset facade to resolve the appropriate paths. The class features several methods that are handy for that.

So it's possible to not use all the dependency management and compilation provided by the package its asset class.

An example of methods you will want to use in your theme if you aren't using it's compilation features:

    {!! Asset::script('something::bootbox/bootbox.js') !!}

    <!-- Get the URL -->
    {!! Asset::url('something::bootbox/bootbox.js') !!}

    <!-- Get the URI -->
    {!! Asset::uri('something::bootbox/bootbox.js') !!}

If these methods aren't provided by the package, it would be a pain to resolve all paths.

Hopefully this example was clear enough. I'll let this issue open until i've updated the documentation which will provide further clarification on the asset aspect of the package and discuss it from there on out.

@RobinRadic
Copy link
Member

I have started to collaborate with another developer on several packages. Laradic/Themes has been merged into Caffeinated\Themes@v3. It features almost all of Laradic\Themes its functionality. We however decided to decouple assets and provide it in a seperate package Caffeinated\Beverage, which is able to compliment Caffeinated\Themes.

Basic asset filesystem and url path resolving is the only asset related thing that still remains in the new Caffeinated\Themes package.

Laradic\Themes will be dropped

@younes0
Copy link
Author

younes0 commented Aug 10, 2015

Nice.

I'm willing to migrate to this package but it seems that you need to use Theme::view() now instead of view(). I liked the fact that you use Themes or not without altering the Controllers...

@RobinRadic
Copy link
Member

You are looking at the wrong branch. I guess you looked over the @v3 when i mentioned Caffeinated\Themes@v3.

So check the v3 branch. :)

It will be merged into the master branch soon.

@younes0
Copy link
Author

younes0 commented Aug 10, 2015

Okay great, switched to your new package.
Only I have one little problem, it requires laradic/support: 2.0 and I'm using blade-extensions as well which requires 1.3 and I couldn't make composer's replace work to bypass this requirement

@RobinRadic
Copy link
Member

for now the only way to use the package is to git clone it to a local directory, git checkout v3 and manually add it to the composer autoload.

Remember that the package is in development and should be treated as such. There will be an official release coming in ~1 week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants