Skip to content

Gulp plugin for adding styles from a css files to the component

License

Notifications You must be signed in to change notification settings

yodairish/gulp-reacss

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gulp-reacss Build Status

Adding styles from a css files to the react component. Using templates where you set list of selectors and css files separated by comma.

Css files parsed by css

Install

$ npm install gulp-reacss --save-dev

Usage

// component.js
var styles = @('.some',
               '.some .one'
                =>
                'css/comp.css',
                'css/all.css')
var Component = React.createClass({
  render: function(){
    return (
      <div className="one" style={styles}></div>
    );
  }
});
// gulpfile.js
var gulp = require('gulp');
var reacss = require('gulp-reacss');

gulp.task('reacss', function () {
	return gulp.src('component.js')
		.pipe(reacss())
		.pipe(gulp.dest('dist'));
});

License

MIT © Yodairish 2014

About

Gulp plugin for adding styles from a css files to the component

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published