From fc0433dd67a22cc2313881b0fb59e25ea309a57f Mon Sep 17 00:00:00 2001 From: Bobby Wibowo Date: Thu, 18 Jun 2020 04:09:01 +0700 Subject: [PATCH] Updated README.md --- README.md | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 016348b..dabeb3d 100644 --- a/README.md +++ b/README.md @@ -47,6 +47,22 @@ During development, the rebuilt files will be saved in `dist-dev` directory inst Once you feel like your modifications are ready for production usage, you can then run `yarn build` to build production-ready files that will actually go to `dist` directory. +## Failing to build dependencies + +Some dependencies may fail to build with Python 2.x, in particular `sqlite3` package. + +If that happens, I recommend building dependencies with Python 3.x instead. + +To force Python 3.x for dependencies building, you can choose to create a file named `.npmrc` in your lolisafe root directory, and fill it with: + +```none +python=/path/to/your/python3.x +``` + +Or you can try the alternative solutions listed in here: [https://github.com/nodejs/node-gyp#configuring-python-dependency](https://github.com/nodejs/node-gyp#configuring-python-dependency). + +> Note: Despite the file being named `.npmrc`, that preference will also be used when installing dependencies with `yarn`, so I still recommend sticking with it. + ## Updating when you have modified some files Try to use [git stash](https://www.git-scm.com/docs/git-stash). @@ -68,7 +84,7 @@ Afterwards, you can instead clone your fork in your production server and pull u ## Script for missing thumbnails -Thumbnails will not be automatically generated for existing files, that had been uploaded prior to enabling thumbnails in the config file. +Thumbnails will not be automatically generated for files that were uploaded before enabling thumbnails generation in the config file. To generate thumbnails for those files, you can use `yarn thumbs`. @@ -87,9 +103,9 @@ verbose: 0 = only print missing thumbs (default), 1 = print all cfcache: 0 = do not clear cloudflare cache (default), 1 = clear cloudflare cache ``` -For example, if you only want to generate thumbnails for image files without overwriting existing ones, you can run `yarn thumbs 1`. +For example, if you only want to generate thumbnails for image files without overwriting existing ones, you can run `yarn thumbs 1`, or if you want to generate thumbnails for both image and video files, while also overwriting existsing ones, you can run `yarn thumbs 3 1`. -Or if you want to generate thumbnails for both image and video files, while also overwriting existsing ones, you can run `yarn thumbs 3 1`. +You will also need to use this script to overwrite existing thumbnails if you want to change thumbnail size. ## ClamAV support