Package Exports
- pxtorem-cli
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (pxtorem-cli) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Pxtorem CLI
A command line wrapper for the excellent postcss-pxtorem module.
Install
npm install --g pxtorem-cli
Usage
Pxtorem CLI takes 3 arguments:
Argument | Alias | Default | Description |
---|---|---|---|
--input |
-i |
n/a |
Relative path to the stylesheet to process |
--output |
-o |
n/a |
Relative path to save the processed stylesheet |
--rootvalue |
-r |
16 |
Default font size for conversion e.g 16px == 1rem |
Example
cd you style folder
pxtorem -i style.css -o style.processed.css -r 16
if you give input arg, you have to give output arg
without arguments
cd you style folder
pxtorem
it will convert all style files in you style floder
warining it will use the default options, and it will cover the file.
default options
{ "rootValue": 16, "unitPrecision": 5, "propWhiteList": [], "selectorBlackList": [], "replace": true, "mediaQuery": false, "minPixelValue": 0 }
but you can create a "pxtorem.json" file in the cwd folder to rewrite the options
v1.0.6 Bug fix
give a value to argument "r" in command line, it dose not work.