-
-
Save EvanLovely/ba72212d18b457baac67c3687953d76c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function lintJson() { | |
return gulp.src('*.theme.json') | |
.pipe(jsonlint()) | |
.pipe(jsonlint.reporter()); | |
} | |
gulp.task('validate:json', 'Test JSON', function() { | |
return lintJson().pipe(jsonlint.failAfterError()); | |
}); | |
tasks.validate.push('validate:json'); | |
gulp.task('lint:json', function() { | |
return lintJson(); | |
}); | |
gulp.task('watch:json', 'Watch JSON to lint', ['validate:json'], function() { | |
return gulp.watch('*.theme.json', ['lint:json']); | |
}); | |
tasks.watch.push('watch:json'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment