diff --git "a/image/reading-with-tiddlywiki-\344\275\277\347\224\250\346\211\213\345\206\214-banner.png" "b/image/reading-with-tiddlywiki-\344\275\277\347\224\250\346\211\213\345\206\214.png" similarity index 100% rename from "image/reading-with-tiddlywiki-\344\275\277\347\224\250\346\211\213\345\206\214-banner.png" rename to "image/reading-with-tiddlywiki-\344\275\277\347\224\250\346\211\213\345\206\214.png" diff --git "a/image/\345\212\253\346\214\201-banner.png" "b/image/\345\212\253\346\214\201.png" similarity index 100% rename from "image/\345\212\253\346\214\201-banner.png" rename to "image/\345\212\253\346\214\201.png" diff --git "a/image/\345\271\263\345\207\241\347\232\204\344\270\226\347\225\214-banner.png" "b/image/\345\271\263\345\207\241\347\232\204\344\270\226\347\225\214.png" similarity index 100% rename from "image/\345\271\263\345\207\241\347\232\204\344\270\226\347\225\214-banner.png" rename to "image/\345\271\263\345\207\241\347\232\204\344\270\226\347\225\214.png" diff --git "a/image/\346\227\266\351\227\264\347\256\200\345\217\262-banner.png" "b/image/\346\227\266\351\227\264\347\256\200\345\217\262.png" similarity index 100% rename from "image/\346\227\266\351\227\264\347\256\200\345\217\262-banner.png" rename to "image/\346\227\266\351\227\264\347\256\200\345\217\262.png" diff --git "a/image/\346\230\216\346\234\235\351\202\243\344\272\233\344\272\213\345\204\277-banner.png" "b/image/\346\230\216\346\234\235\351\202\243\344\272\233\344\272\213\345\204\277.png" similarity index 100% rename from "image/\346\230\216\346\234\235\351\202\243\344\272\233\344\272\213\345\204\277-banner.png" rename to "image/\346\230\216\346\234\235\351\202\243\344\272\233\344\272\213\345\204\277.png" diff --git "a/image/\347\220\203\347\212\266\351\227\252\347\224\265-banner.png" "b/image/\347\220\203\347\212\266\351\227\252\347\224\265.png" similarity index 100% rename from "image/\347\220\203\347\212\266\351\227\252\347\224\265-banner.png" rename to "image/\347\220\203\347\212\266\351\227\252\347\224\265.png" diff --git "a/image/\350\202\226\347\224\263\345\205\213\347\232\204\346\225\221\350\265\216-banner.png" "b/image/\350\202\226\347\224\263\345\205\213\347\232\204\346\225\221\350\265\216.png" similarity index 100% rename from "image/\350\202\226\347\224\263\345\205\213\347\232\204\346\225\221\350\265\216-banner.png" rename to "image/\350\202\226\347\224\263\345\205\213\347\232\204\346\225\221\350\265\216.png" diff --git a/package.json b/package.json index 3962649..2aa4de7 100644 --- a/package.json +++ b/package.json @@ -9,8 +9,7 @@ "build:ibooks": "ts-node ./src/index.ts -i", "format": "prettier --write src/**", "lint": "eslint src", - "build": "ts-node ./src/index.ts && tiddlywiki --build", - "update:image": " find image -type f -name '*.png' ! -name '*-banner.png' -exec pngquant --ext .png --force {}" + "build": "ts-node ./src/index.ts && tiddlywiki --build" }, "keywords": [ "books", diff --git a/scripts/minify-png.sh b/scripts/minify-png.sh new file mode 100644 index 0000000..7cbabe2 --- /dev/null +++ b/scripts/minify-png.sh @@ -0,0 +1,2 @@ +# find image -type f -name '*-banner.png' -exec bash -c 'mv "$0" "${0//-banner}"' {} \; +find image -type f -name '*.png' ! -name '*-banner.png' -exec pngquant --ext .png --force {} \; \ No newline at end of file