sheerun / bowered

Bower client that integrates with Sprockets
MIT License
2 stars 0 forks source link

Sprockets integration #7

Open sheerun opened 10 years ago

sheerun commented 10 years ago

This should be partly extracted from bower-rails.

  1. Paths of installed components should be synchronized with sprockets paths
  2. We should issue bowered install programmatically before assets:precompile

I leave research for this task for @SergeyKishenin

Ideally there should be no need for restarting server in development for reloading assets.

Some cases to be handled:

  1. Bowerfile.lock is modified (remove old paths, add new paths)
  2. Files in component source repositories are changed (recompile in development).

Integration would be independent of rails, but could be hooked-up to rails server command if rails environment was detected (run bowered install --watch as a thread from rails server command).

We need to do research about changing sprockets paths in runtime.

SergeyKishenin commented 10 years ago

I'm not sure that modifying Bowerfile.lock is a good idea. We are to have Bowerfile and Bowerfile.lock firmly synchronized. If some modifications we made to one file we should keep up-to-date another one. This topic need to be discussed more, I think.

SergeyKishenin commented 10 years ago

I'll look more deeply into sprockets

sheerun commented 10 years ago

I don't talk about modyfying Bowerfile.lock, but paths in sprockets :)

But it's possible there are many matching Bowerfile.lock for one Bowerfile.

For example if in Bowerfile we have "jquery", "> 1.0.0", the 1.1 and 1.2 versions in Bowerfile.lock are ok.

sheerun commented 10 years ago

Sample use case:

Given User starts rails application with `rails server`
When User issues `bowered update` in separate terminal
Then Sprockets paths in running server are updated and assets re-compiled
And User sees updated assets after refresh in browser
SergeyKishenin commented 10 years ago

Sample use case

Got it, thanks.