Gulp React Statics Style
gulp wrapper for react-statics-styles
.
Its takes components source files which export component definitions, and gives CSS files. You can then pipe it to other processors, such as gulp-postcss
.
Usage
babel
to run it.
<<<<<<< HEAD
This module is written in ES6/7. You will need - Fork or clone this repository.
- (Optional) Edit
package.json
if you intent to publish your package onnpm
. npm install
to install all the required dependencies fromnpm
.- Hack
src/index.jsx
andsrc/__tests__/index.jsx
. - Lint/test using
gulp
. - Don't forget to edit this
README.md
file.
starterkit/master
In a component file (eg. MyComponent.jsx
):
; @Component ... <<<<<<< HEAD;
=======
- Sanely configured
gulpfile.js
,package.json
,.gitignore
,.editorconfig
,.eslintrc
,.jsbeautifyrc
. - Both CommonJS and ES6 modules are supported.
- Linting and testing is pre-configured.
lodash
,bluebird
andshould
are included by default.
starterkit/master
In your gulpfile.js
:
var styles = ; gulp;
You can combine this with any JS preprocessor or CSS postprocessor, for example if you use babel
for JS, and autoprefixer-core
and csswring
for CSS (via postcss
):
gulp ;
In the real world, you probably want to only run your JS source transformation once per build and cache the results, but its up to you to design your gulpfile accordingly :)