Skip to content

carbono-io/gulp-polymerize-css

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Gulp polimerize css

Gulp plugin that transforms css files into .html files with a dom-module with the styles.

It was written to convert css into style modules, as specified by polymer docs.

Makes life easier for those who want to use css preprocessors AND Polymer :)

Usage

Install it with npm

npm install gulp-polymerize-css

In your gulpfile.js:

var polymerizeCss = require('gulp-polymerize-css'),
    rename = require('gulp-rename');

gulp.task('styles', function(){
  return gulp.src('app/styles/style.css')
    .pipe(polymerizeCss({styleId:'custom-style'}))
    .pipe(rename('style.html'))
    .pipe(gulp.dest('dist/styles'));
});

It results in:

<dom-module id="custom-style">
  <template>
    <style>
     <!-- YOUR STYLE HERE -->
    </style>
  </template>
</dom-module>

Options

  • styleId (String): the id that you will use for importing the style

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published