Skip to content

tommaton/gulp-css-to-polymer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gulp-css-to-polymer

A gulp plugin for wrapping css files into ES6 modules as used by Polymer

Install

npm

$ npm install --save-dev gulp-css-to-polymer

yarn

$ yarn add gulp-css-to-polymer

Examples

const polymerizeCSS = require('gulp-css-to-polymer');

// Wrap css files
gulp.task("polymerize", () => {
    gulp.src("./src/**/*.css")
        .pipe(polymerizeCSS({
            prefix: 'tg-',
            suffix: '-styles',
            pwa: true
        }))
        .pipe(gulp.dest("./dist"));
}

Options / Defaults

{
    // string to be used for the beginning of the file name & module ids.
    prefix: 'tg-',
    // string to be used for the end of the file name & module ids.
    suffix: '-styles',
    // boolean, determines how the styles are generated as differentate between Polymer and Polymer PWA
    pwa: true // default is false,
}

LICENSE MIT

About

Converting CSS to a ES6 Module for Polymer V3.x.x

Resources

Stars

Watchers

Forks

Packages

No packages published