1.7.4 • Published 5 years ago
handlepx v1.7.4
handle css value with unit
multiply value by factor
A CLI tool not a loader
install
npm i handlepx -g
desc
will convert match value to value*factor
match pattern
"(-?\\d+(\\.\\d+)?)" + unit
usage
handlepx go <directory/filePath> [options]
option
-X --exclude_1px
-E --postfix [items] // list, e.g. css,less,sass, default: css
-F --factor [value] // integer/float , default: 0.5
-U --unit [value] // default: px
-N --negative //only convert negative value
-P --positive //only convert postivie value
-R --relace_unit // specify custom unit which will replace unit of -U
Note:
1px will be converted by default.
exclude 1px
To exclude 1px, you can add option -X/--exclude_1px.
arguments
directory/filePath : required
default: __dirname
relative/absolute path both works.
You can ignore cssFileExtesion when you specify filePath.
exmaple
1. extension:scss, factor:2
handlepx go ./ -E scss -F 2
2. exclude 1px
handlepx go ./common.scss -X
3. convert both scss and css
handlepx go ./test -E scss,css
4. convert rem unit
handlepx go ./ -U rem
1.7.4
5 years ago
1.7.3
5 years ago
1.7.2
5 years ago
1.7.1
5 years ago
1.6.12
5 years ago
1.6.11
5 years ago
1.6.10
5 years ago
1.6.9
5 years ago
1.6.8
5 years ago
1.6.7
5 years ago
1.6.6
5 years ago
1.6.5
5 years ago
1.6.4
5 years ago
1.6.3
5 years ago
1.6.2
5 years ago
1.5.2
5 years ago
1.5.1
5 years ago
1.4.8
5 years ago
1.4.7
5 years ago
1.4.6
5 years ago
1.4.5
5 years ago
1.4.4
5 years ago
1.4.3
5 years ago
1.4.2
5 years ago
1.4.1
5 years ago
1.3.2
5 years ago
1.3.1
5 years ago
1.2.3
5 years ago
1.2.2
5 years ago
1.1.7
5 years ago
1.1.6
5 years ago
1.1.5
5 years ago
1.1.4
5 years ago
1.1.3
5 years ago
1.1.2
5 years ago