chrome-devtools-autosave
chrome-devtools-autosave copied to clipboard
Make it work with the Rails’ Asset Pipeline
Hey there !
I just tried to use autosave on a rails app and it saves the stylesheet in app/assets/application.css where the actual file is app/assets/stylesheets/application.css
What can I do to make this work ?
Thanks !
Still looking for help.
- Make Asset Pipeline work with Chrome DevTools Autosave
- http://www.ruby-forum.com/topic/3861633
@trenkwill
Create a routes.js file:
exports.routes = [
{
from: new RegExp('http://my-rails-app.local/assets/(.+?\.css)'),
to: '/Users/nv/my-rails-app/app/assets/stylesheets/$1'
},
{
from: new RegExp('http://my-rails-app.local/assets/(.+?\.js)'),
to: '/Users/nv/my-rails-app/app/assets/javascripts/$1'
}
]
and run autosave --config routes.js
.
Keep in mind, it won’t change files in the other assets directories such as lib/assets and vender/assets. This is why I’m asking for help with Rails plugin.