KnpRadBundle icon indicating copy to clipboard operation
KnpRadBundle copied to clipboard

It should not contain js / css libs in Resources/public folders

Open docteurklein opened this issue 11 years ago • 8 comments
trafficstars

Currently, we store 2 or 3 jquery versions :)

It would be cool to delegate this to bower (or any other package manager). The bundle itself doesn't need js/css BTW. an application does. That's why I propose to move all this to rad-edition.

docteurklein avatar Nov 26 '13 09:11 docteurklein

see Knplabs/rad-edition#24

docteurklein avatar Nov 26 '13 09:11 docteurklein

I suggest to use npm/bower for js/css dependencies. ( I love this little class: https://github.com/yohang/dependency-tools )

Nek- avatar Dec 31 '13 15:12 Nek-

composer is good for managing php deps, not npm install commands.

docteurklein avatar Dec 31 '13 17:12 docteurklein

you could use the SpBowerBundle as a way to interact with bower. Not sure if that's the best one or not though.

ghost avatar Jul 11 '14 07:07 ghost

@jrobeson This look like the solution I suggested. But it will not be implemented.

Just a little notice about alternatives: https://github.com/components/components

Nek- avatar Jul 11 '14 08:07 Nek-

there's a another solution on the horizon if some composer modifications get merged.

https://github.com/francoispluchino/composer-asset-plugin

ghost avatar Aug 09 '14 06:08 ghost

I'm not sure if I'm right, but I'm all for a pure frontend solution for frontend assets, and composer for backend.

Separation is the keyword. In an ideal world, front and back would be separated in 2 different projects :)

docteurklein avatar Aug 09 '14 08:08 docteurklein

Frontend assets should not be provided by a bundle (I mean common ones like jquery and so on), because it is not bundle-specific but application-specific, in this case project developers should decide the way of maintaining the assets (bower, SpBowerBundle, hard copypaste whatever) _themselves_. https://github.com/knplabs/rad-edition solves this issue via bower and it is completely enough, I think. What RAD Bundle can offer is a helper or some template where developer can specify the location of templates and it will be included in all other RAD templates.

akovalyov avatar Aug 15 '14 15:08 akovalyov