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

Either plugin doesn't work or I'm really confused #18

Open
altano opened this issue Jul 5, 2013 · 5 comments
Open

Either plugin doesn't work or I'm really confused #18

altano opened this issue Jul 5, 2013 · 5 comments

Comments

@altano
Copy link

altano commented Jul 5, 2013

Either plugin doesn't work or I'm really confused:

cdn:html - asdf.html
skipping /favicon.ico it's a relative URL
skipping /images/favicon.png it's a relative URL
skipping /stylesheets/616c.rails-consulting-screen.css it's a relative URL
skipping /stylesheets/bad8.rails-consulting-print.css it's a relative URL
skipping /stylesheets/vendor/d287.coderay.css it's a relative URL
skipping /images/rails-consulting/logo.png it's a relative URL
skipping /images/rails-consulting/nav_consulting.png it's a relative URL
skipping /images/rails-consulting/nav_ideas.png it's a relative URL
...

What is an absolute URL then? The documentation makes it sound like these URLs are absolute and they should be processed. What am I missing?

@altano
Copy link
Author

altano commented Jul 6, 2013

I looked through the source: it looks like 'flatten' just has to be true or relative URLs are skipped. I'm really confused as that doesn't make sense to me.

Also, options.stripDirs and options.match aren't documented, despite the latter being pretty important. Can I count on them sticking around? If so, maybe I'll document them for you...

@johnnyhalife
Copy link
Contributor

URLs that get CDNified (by default) are those relative. However you can use stripeDirs we'll keep it around as long as you're using it =)

@altano
Copy link
Author

altano commented Jul 6, 2013

URLs that get CDNified (by default) are those relative

Can you give me an example URL that will get CDNified with the default options?

@johnnyhalife
Copy link
Contributor

Sorry, it seems to be a bug there. /static/foo.png should be cdnefied.

I'll check later, if you find the offending line you're welcome to send a
PR =). We'll take a look too.

On Sat, Jul 6, 2013 at 8:15 PM, Alan [email protected] wrote:

URLs that get CDNified (by default) are those relative

Can you give me an example URL that will get CDNified with the default
options?


Reply to this email directly or view it on GitHubhttps://github.com//issues/18#issuecomment-20562731
.

@altano
Copy link
Author

altano commented Jul 6, 2013

grunt-cdn.js:104 is the offending line:

if (!options.flatten && !grunt.file.isPathAbsolute(resourceUrl.pathname)) {

I would send you a fix but I don't really understand how options.flatten is supposed to work.

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

No branches or pull requests

2 participants