freeCodeCamp/curriculum/gulpfile.js

28 lines
491 B
JavaScript
Raw Normal View History

2018-10-05 11:20:51 +00:00
const gulp = require('gulp');
const through2 = require('through2');
2018-10-05 11:20:51 +00:00
2019-07-25 19:15:31 +00:00
const lintMarkdown = require('../tools/scripts/lint');
const { testedLang } = require('./utils');
/**
* Tasks
**/
2018-10-05 11:20:51 +00:00
function lint() {
return gulp.src(globLang(testedLang()), { read: false }).pipe(
through2.obj(function obj(file, enc, next) {
2019-06-13 09:26:08 +00:00
lintMarkdown(file, next);
})
);
}
/**
* Helper functions
**/
function globLang(lang) {
return `./challenges/${lang}/**/*.md`;
}
gulp.task('lint', lint);