tiny_yd_kiko
v0.0.5
Published
Automatically compress the library of pictures in the project.
Downloads
6
Readme
tinyPicture
introduce
Automatically compress the library of pictures in the project.
Installation tutorial
- npm i tiny_yd_kiko.
- Add the configuration file "tinyYd.config.ts" to the project.
- Type in the configuration file.
"projectImageSaveDir" is the path to store pictures.
"Key" is the key required by the image compression library, which can be obtained from the official website of the library https://tinypng.com/developers.
export default {
configs: [
{
projectImageSaveDir: 'The directory where your pictures are stored',//ex:./src/images
},
],
key: 'your tiny apiKey'
}
instructions
- Write in the script of package.json.
"scripts": {
"compressPic": "tinyYd"
}
Execute the command npm run compresspic on the terminal to compress the pictures in the project.
Let's have a try.