From fd6457fd99cbdef2210d82f98369ebb180fb8529 Mon Sep 17 00:00:00 2001 From: Ivan Bunin Date: Fri, 25 Jan 2019 14:32:36 +0300 Subject: [PATCH] update readme --- README.md | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 21a16c5..fd38aa9 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. @@ -113,7 +118,7 @@ Default: - `mediaQuery` (Boolean) Allow px to be converted in media queries. ### Use with gulp-postcss - +add to your gulp config: ```js var gulp = require('gulp'); var postcss = require('gulp-postcss'); @@ -133,3 +138,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 + } + } +} +```