Skip to content
This repository has been archived by the owner on Apr 20, 2018. It is now read-only.

Using grunt-usemin with dynamically generated image paths in JS #222

Closed
cabaret opened this issue Nov 6, 2013 · 1 comment
Closed

Using grunt-usemin with dynamically generated image paths in JS #222

cabaret opened this issue Nov 6, 2013 · 1 comment

Comments

@cabaret
Copy link

cabaret commented Nov 6, 2013

In a website I'm building, I have some 'slides', ie. different backgrounds. They're all called 1, 2, 3, ... .jpg.

In my script, I have the following snippet:

for(var i = 1; i <= config.numSlides; i++) {
  images.push(config.imageBase + i + '.jpg');
}

However, since usemin renames my images, the i variable isn't correct anymore and the preloader (in this case) can't find the correct images anymore.

What would be a way to solve this? If possible at all?

Thanks.

@sindresorhus
Copy link
Member

Duplicate of #5.

Please search the issue tracker and StackOverflow before opening a ticket.

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

2 participants