gulp-lit-styles
v2.0.0
Published
Gulp plugin for wrapping css or scss files into style modules (as used by Lit.dev)
Downloads
5
Maintainers
Readme
gulp-lit-styles
A gulp plugin for wrapping css or scss files into style modules as used by Lit
Install
$ npm install --save-dev gulp-lit-styles
Examples
import sass from 'sass';
import gulpSass from 'gulp-sass';
import styleModules from 'gulp-polymer-styles';
gulp.task('modularize-styles', () => {
return gulp.src('./src/**/*.scss')
.pipe(gulpSass(sass)({
outputStyle: 'compressed',
})
.on('error', logError))
.pipe(styleModules())
.pipe(gulp.dest('./src'));
});
Options / Defaults
{
// string / function to be used for file names. Can be either a fixed string or a function
// that takes a [vinyl](https://github.com/gulpjs/vinyl) file object and returns a string
filename: function (file) {
return path.basename(file.path, path.extname(file.path)) + "-styles";
}
}