gulp-sass-in-html
v1.0.1
Published
sass compilation in html and pug
Downloads
5
Readme
Gulp sass in html
Sass compilation in html and pug
Install
You can get gulp-sass-in-html
from NPM:
To save to a project as a dev dependency
npm install gulp-sass-in-html --save-dev
Example
gulpfile.js
var sassInHtml = require('gulp-sass-in-html');
gulp.src('src/test.html')
.pipe(sassInHtml())
.pipe(gulp.dest('dist'));
src/test.html
<html>
<head>
<style type="text/sass">
body
background: black
color: red
.love
color: red
font-size: 12px
</style>
</head>
<body>
</body>
</html>
dist/test.html
<html>
<head>
<style type="text/css">
body {
background: black;
color: red; }
body .love {
color: red;
font-size: 12px; }
</style>
</head>
<body>
</body>
</html>
Use in pug.js
html
head
.
<style type="text/sass">
body
background: black
color: red
.love
color: red
font-size: 12px
</style>
recommended indentation
indent type: spaces indent length: 2 spaces