ddenyss / gulp-html-bem-validator Goto Github PK
View Code? Open in Web Editor NEWLicense: ISC License
License: ISC License
Классы на теге <html>
вообще никак не учитываются в составлении БЭМ-дерева.
<!DOCTYPE html>
<html class="page" lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body class="page__body">
<header class="page__header">Header</header>
<main class="main-content">
<div class="page__leveler">
Content
</div>
</main>
<footer class="page__footer">Footer</footer>
</body>
</html>
В таком коде все элементы блока page
признаются ошибочными.
При написание класса .block__element__element выдаёт, что код валидный
Предлагаю добавить возможность проверки последовательности заголовков, как это реализовано в интерфейсе https://yoksel.github.io/html-tree/ = https://prnt.sc/10v75a8 . Если иерархия нарушена, то выдавать ошибку.
«Gulp» ждет сигнала о завершении задачи:
[08:26:30] The following tasks did not complete: html-bem-validator
[08:26:30] Did you forget to signal async completion?
Я думаю, нужно исправить пример описания задачи. Например, так:
var gulp = require('gulp');
var gulpHtmlBemValidator = require('gulp-html-bem-validator');
gulp.task('html-bem-validator', (cb) => {
gulp.src('pages/*.html')
.pipe(gulpHtmlBemValidator())
.pipe(gulp.dest('build/'));
cb();
});
Или вообще не использовать task()
. На сайте «Gulp» теперь рекомендуют регистрировать задачи с помощью экспорта:
var gulp = require('gulp');
var gulpHtmlBemValidator = require('gulp-html-bem-validator');
function htmlBemValidator(cb) {
gulp.src('pages/*.html')
.pipe(gulpHtmlBemValidator())
.pipe(gulp.dest('build/'));
cb();
}
exports.htmlBemValidator = htmlBemValidator;
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.