You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-06-15 23:00:36 +02:00
CLI: Improved: Update sharp (for node 12 compatibility) (#1471)
This commit is contained in:
committed by
Laurent Cozic
parent
01f2759a62
commit
788dc42684
@ -87,9 +87,10 @@ function shimInit() {
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
sharp(filePath)
|
||||
.resize(Resource.IMAGE_MAX_DIMENSION, Resource.IMAGE_MAX_DIMENSION)
|
||||
.max()
|
||||
.withoutEnlargement()
|
||||
.resize(Resource.IMAGE_MAX_DIMENSION, Resource.IMAGE_MAX_DIMENSION, {
|
||||
fit: 'inside',
|
||||
withoutEnlargement: true,
|
||||
})
|
||||
.toFile(targetPath, (err, info) => {
|
||||
if (err) {
|
||||
reject(err);
|
||||
|
Reference in New Issue
Block a user