Skip to content

TypeError: gulp.files is not a function #46

@StephenBugden

Description

@StephenBugden

Hello,

I am trying to run the code below to validate some css and write the results to a file. I took the code from and modified it to use my directories:
https://www.npmjs.com/package/gulp-csslint

I'm getting an error with the following message:
TypeError: gulp.files is not a function

Here's the code:
//************************************************
var gulp = require('gulp');

var CSS_PATH = 'public/css/*/.css';
var DIST_PATH = 'public/dist';

gulp.task('lintcss', function(cb) {
  var fs = require('fs');
  var output = '';
 
gulp.files(CSS_PATH)
.pipe(csslint())
    .pipe(csslint.reporter('junit-xml', {logger: function(str) { output += str; }}));
 
  fs.writeFile(DIST_PATH + 'junit.xml', output, cb);
});
//*****************************************************

Best Regards,

Steve

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