From 1e84a52fe065c284f060c35ab9e0e2ed5232aa3c Mon Sep 17 00:00:00 2001 From: Pierre Brisorgueil Date: Thu, 29 Apr 2021 16:23:31 +0200 Subject: [PATCH] =?UTF-8?q?build(husky):=20upgrade=20=F0=9F=8F=97=20(#361)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .husky/.gitignore | 1 + .husky/commit-msg | 4 ++++ package.json | 7 +------ waosSwift/lib/helpers/Extensions/UIImage.swift | 14 +++++++------- 4 files changed, 13 insertions(+), 13 deletions(-) create mode 100644 .husky/.gitignore create mode 100755 .husky/commit-msg diff --git a/.husky/.gitignore b/.husky/.gitignore new file mode 100644 index 0000000..31354ec --- /dev/null +++ b/.husky/.gitignore @@ -0,0 +1 @@ +_ diff --git a/.husky/commit-msg b/.husky/commit-msg new file mode 100755 index 0000000..62aa592 --- /dev/null +++ b/.husky/commit-msg @@ -0,0 +1,4 @@ +#!/bin/sh +. "$(dirname "$0")/_/husky.sh" + +npx --no-install commitlint --edit "$1" \ No newline at end of file diff --git a/package.json b/package.json index 2678fca..e1d7428 100644 --- a/package.json +++ b/package.json @@ -15,15 +15,10 @@ "yarn": ">=1.13.0" }, "scripts": { - "commit": "npx git-cz", + "commit": "npx cz", "release": "standard-version", "release:auto": "npx semantic-release" }, - "husky": { - "hooks": { - "commit-msg": "commitlint -E HUSKY_GIT_PARAMS" - } - }, "devDependencies": { "@commitlint/cli": "^12.1.1", "@commitlint/config-conventional": "^12.1.1", diff --git a/waosSwift/lib/helpers/Extensions/UIImage.swift b/waosSwift/lib/helpers/Extensions/UIImage.swift index 61f9667..b69a669 100644 --- a/waosSwift/lib/helpers/Extensions/UIImage.swift +++ b/waosSwift/lib/helpers/Extensions/UIImage.swift @@ -27,7 +27,7 @@ extension UIImage { guard let cgImage2 = ciContext.createCGImage(resultImage, from: inputImage.extent) else { return self } return UIImage(cgImage: cgImage2) } - + /** * @desc lighter image * @param {CGFloat} percentage, @@ -35,7 +35,7 @@ extension UIImage { func lighter(by percentage: CGFloat = 30) -> UIImage? { return self.adjust(by: abs(percentage) ) } - + /** * @desc darker image * @param {CGFloat} percentage, @@ -43,7 +43,7 @@ extension UIImage { func darker(by percentage: CGFloat = 30) -> UIImage? { return self.adjust(by: -1 * abs(percentage) ) } - + /** * @desc adjust image darkness / lightness from coefficient * @param {CGFloat} percentage, @@ -59,7 +59,7 @@ extension UIImage { guard let cgImage2 = ciContext.createCGImage(resultImage, from: inputImage.extent) else { return self } return UIImage(cgImage: cgImage2) } - + /** * @desc adjust image orientation if needed in exif */ @@ -75,7 +75,7 @@ extension UIImage { return result } } - + /** * @desc resizeImage width max target Size */ @@ -85,12 +85,12 @@ extension UIImage { let heightRatio = targetSize.height / size.height let newSize = widthRatio > heightRatio ? CGSize(width: size.width * heightRatio, height: size.height * heightRatio) : CGSize(width: size.width * widthRatio, height: size.height * widthRatio) let rect = CGRect(x: 0, y: 0, width: newSize.width, height: newSize.height) - + UIGraphicsBeginImageContextWithOptions(newSize, false, 1.0) self.draw(in: rect) let newImage = UIGraphicsGetImageFromCurrentImageContext() UIGraphicsEndImageContext() - + return newImage } }