image2base64-cli
A CLI tool to convert image file to base64 string.
install
yarn global add image2base64-cli
usage
image2base64-cli favicon.ico --scss
or
image2base64-cli *.ico --scss variables.scss
or
image2base64-cli *.ico --less variables.less
or
image2base64-cli *.ico --es6 variables.js
or
image2base64-cli *.ico --scss variables.scss --less variables.less --json variables.json --es6 variables.js --base demo
or
image2base64-cli *.ico --scss variables.scss --less variables.less --json variables.json --es6 variables.js --base demo --watch
options
key | description |
---|---|
-w,--watch | watch mode |
--base | base directory |
--json | generate json file of variables |
--scss | generate scss file |
--less | generate less file |
--es6 | generate es6 file |
-h,--help | Print this message. |
-v,--version | Print the version |
change logs
// v2the variable name will be the whole path relative to `base`(by `--base basename`) // v1the variable name is the name of the image file