1.7.4 • Published 6 years ago

handlepx v1.7.4

Weekly downloads
1
License
ISC
Repository
github
Last release
6 years ago

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

6 years ago

1.7.3

6 years ago

1.7.2

6 years ago

1.7.1

6 years ago

1.6.12

6 years ago

1.6.11

6 years ago

1.6.10

6 years ago

1.6.9

6 years ago

1.6.8

6 years ago

1.6.7

6 years ago

1.6.6

6 years ago

1.6.5

6 years ago

1.6.4

6 years ago

1.6.3

6 years ago

1.6.2

6 years ago

1.5.2

6 years ago

1.5.1

6 years ago

1.4.8

6 years ago

1.4.7

6 years ago

1.4.6

6 years ago

1.4.5

6 years ago

1.4.4

6 years ago

1.4.3

6 years ago

1.4.2

6 years ago

1.4.1

6 years ago

1.3.2

6 years ago

1.3.1

6 years ago

1.2.3

6 years ago

1.2.2

6 years ago

1.1.7

6 years ago

1.1.6

6 years ago

1.1.5

6 years ago

1.1.4

6 years ago

1.1.3

6 years ago

1.1.2

6 years ago