F
F
FlexibleCurd2016-02-15 15:51:00
Layout
FlexibleCurd, 2016-02-15 15:51:00

Grunt sprite template?

Hello.
sprite in Gruntfile:

sprite:{
      all: {
        src: 'app/img/sprite/*.png',
        dest: 'app/img/sprite.png',
        destCss: 'app/css/less/sprite.less'
      }
    }

After the launch, sprite.png and sprite.less are created - in which all mixins for connecting sprites (standard procedure), but the path to the image in sprite.less turns out to be:
../../img/sprite.png
and I need this: ../img/sprite.png
that is, I need my own path, and not relative to the sprite.less file
Maybe someone came across how to implement this?
This is not about Less. The main thing is how to teach him to put the path to the sprite.png that I need? I think this is implemented through templates, but how to do it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
MNB, 2016-02-16
@FlexibleCurd

https://github.com/Ensighten/grunt-spritesmith#doc...

imgPath String - Optional override for spritesheet path specified in CSS
For example if ../sprite.png is given, then the CSS will have:
background-image: url(../sprite.png);

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question