Skip to content

Use of variable in output path fails #3

Description

@osmestad

I use a version number in my paths:

dataUri: {
      dist: {
        // src file
        src: ['build/v<%= pkg.version %>/css/wimp.css'],
        // output dir
        dest: 'build/v<%= pkg.version %>/css',
        options: {
          // specified files are only encoding
          target: ['build/v<%= pkg.version %>/img/*.*']
        }
      }
    }

This fails for 'dest' since it is not read by a grunt method.

Proposed change to data-uri.js:
Line 26:
destDir = path.resolve(this.data.dest),
to:
destDir = grunt.file.expandDirs(this.data.dest),
And line 33:
outputTo = destDir+'/'+path.basename(src),
to:
outputTo = destDir+path.basename(src),

(I have not tested if this requires changes to the path renaming part of the code, as I'm not using that.)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions