diff --git a/README.md b/README.md index d34825f..28c5ba7 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,11 @@ A plugin for [PostCSS](https://github.com/ai/postcss) that generates viewport units (vw, vh, vmin, vmax) from pixel units. +## Install +``` +$ npm install postcss-px-to-viewport --save-dev +``` + ## Usage If your project involves a fixed width, this script will help to convert pixels into viewport units. @@ -117,7 +122,7 @@ Default: - If value is array, the elements of the array are regexp. ### Use with gulp-postcss - +add to your gulp config: ```js var gulp = require('gulp'); var postcss = require('gulp-postcss'); @@ -137,3 +142,15 @@ gulp.task('css', function () { .pipe(gulp.dest('build/css')); }); ``` +### Use with Postcss configuration file +add to postcss.config.js +```js +module.exports = { + plugins: { + ... + 'postcss-px-to-viewport': { + // options + } + } +} +```