Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
ffflabs opened this issue Feb 2, 2018 · 0 comments
Open

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

ffflabs opened this issue Feb 2, 2018 · 0 comments

Comments

@ffflabs
Copy link

ffflabs commented Feb 2, 2018

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant