W
W
Worddoc2016-08-04 17:00:32
JavaScript
Worddoc, 2016-08-04 17:00:32

Why does gulp uncss remove almost all styles?

Hello. I decided to try the plugin, but for some reason it clears all styles except fonts. What could be the problem?

gulp.task('uncss', function() {
  return gulp.src('src/css/*.css')
       .pipe(uncss({
       	html: 'src/index.html'
       }))
       .pipe(gulp.dest('src/css'))
})

<!DOCTYPE html>
<html lang="ru">
<head>
  <meta charset="UTF-8">
  <title>LandX</title>
  <link rel="stylesheet" href="css/main.css">
  <link rel="stylesheet" href="css/libs.min.css">
</head>
<body>
<script src="js/libs.min.js"></script>
<script src="js/common.js"></script>
</body>
</html>

I don't include the whole structure, it's too cumbersome

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Mikhail Osher, 2016-08-04
@miraage

Теперь все ясно. И где вы тут видите хоть один класс в index.html?
Гуглите в сторону "uncss single page application".

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question