Skip to content

file.src should be file.orig.src (grunt 1.0.1) #211

Description

@ffflabs

I've seen that src filepaths are referenced using file.src

https://github.com/addyosmani/grunt-uncss/blob/f2c24ca17a8e6a4e114fb03f50ec605c0d986594/tasks/uncss.js#L22-L23

However, if I use a config such as:

grunt.config('custom_uncss', {
    test: {
      files: {
        'dist/css/tidy.css': ['http://localhost:9003/']
      }
    }
});

logging the contents of file I get:

{ 
  src: [Getter],
  dest: 'dist/css/tidy.css',
  orig: { 
    src: [ 'http://localhost:9003/' ], 
    dest: 'dist/css/tidy.css' 
  }
}

file.src turns out to be an empty array, whereas file.orig.src contains the array of filepaths I intended to be the sources.

Perhaps there could be a check setting the sources to be the contents of file.orig.src when file.src turns out to be empty.

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions