grunt-sprite-generator icon indicating copy to clipboard operation
grunt-sprite-generator copied to clipboard

baseUrl is not replaceable

Open davidpelayo opened this issue 9 years ago • 1 comments

I'm trying to set my own baseUrl path in order to generate outputs relative to a certain URL, but it doesn't work.

When you modify the baseUrl as an option in the grunt configuration object from outside (not the plugin JS file), instead, the configuragion object in the Gruntfile.js, paths are processed wrongly, not being able to execute the task properly.

Following the next example:

spriteGenerator: {
      options: {
        algorithm: 'binary-tree',
        baseUrl: './app/',
        padding: 0
      },
      default_task: {
        files: {
          'app/images/sprites.png': ['css/main.css']
        }
      }
    },

If you console.log the files array in "spriteGenerator.js", the reference of src files are lost.

davidpelayo avatar Oct 13 '14 13:10 davidpelayo

I pressume is an issue with Grunt files management, right? http://gruntjs.com/configuring-tasks#options

davidpelayo avatar Oct 13 '14 14:10 davidpelayo