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

Make it work with the Rails’ Asset Pipeline #27

Open
NV opened this issue Feb 16, 2012 · 3 comments
Open

Make it work with the Rails’ Asset Pipeline #27

NV opened this issue Feb 16, 2012 · 3 comments
Labels

Comments

@NV
Copy link
Owner

NV commented Feb 16, 2012

Asset Pipeline

@trenkwill
Copy link

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 !

@NV
Copy link
Owner Author

NV commented Mar 16, 2012

@NV
Copy link
Owner Author

NV commented Mar 16, 2012

@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.

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

No branches or pull requests

2 participants