Skip to content
This repository has been archived by the owner on Jul 22, 2022. It is now read-only.

Serving assets from CDN #9

Open
rymohr opened this issue Mar 5, 2015 · 5 comments
Open

Serving assets from CDN #9

rymohr opened this issue Mar 5, 2015 · 5 comments

Comments

@rymohr
Copy link

rymohr commented Mar 5, 2015

Is it possible to precompile assets and serve them from a CDN instead? I've been using asset_sync with the default rails pipeline and it's been working great.

@greypants
Copy link
Contributor

Yeah, definitely possible. I haven't done it yet personally, but here are some resources to get you started.

This option in rev-collector https://www.npmjs.com/package/gulp-rev-collector#dirreplacements should let you get your cdn path in there. There are other gulp plugins for uploading. Here are a couple for publishing to amazon web services:

https://www.npmjs.com/package/gulp-s3-upload
https://www.npmjs.com/package/gulp-awspublish

@rymohr
Copy link
Author

rymohr commented Mar 6, 2015

As is the project completely ignores asset_host though right?

@greypants
Copy link
Contributor

Yeah, none of the tasks know about Ruby or Rails.

@joaovpmamede
Copy link

@rymohr Did you find a way of getting the assets from a CDN?
From what I get rev-collector only changes files from html templates but we probably need to get other assets referenced on css also.

@rymohr
Copy link
Author

rymohr commented Apr 14, 2015

@joaovpmamede I haven't actually tried to use this one yet. The project I was hoping to use it for is a production app with 50k lines of js so it won't be an easy migration. Waiting till it's been battle tested a bit more.

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

No branches or pull requests

3 participants