@szydlovski/canvas-utility
Advanced tools
Comparing version
{ | ||
"name": "@szydlovski/canvas-utility", | ||
"version": "1.2.0", | ||
"version": "2.0.0", | ||
"description": "simple canvas 2d utility - trimming, rotating, resizing", | ||
"main": "dist/bundle.js", | ||
"main": "build/index.js", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1", | ||
"build": "rollup -c", | ||
"build": "tsc", | ||
"dev": "rollup -c --watch" | ||
@@ -20,3 +19,6 @@ }, | ||
"@rollup/plugin-node-resolve": "^11.0.1", | ||
"rollup": "^2.35.1" | ||
"@rollup/plugin-typescript": "^8.2.5", | ||
"rollup": "^2.35.1", | ||
"tslib": "^2.3.0", | ||
"typescript": "^4.3.5" | ||
}, | ||
@@ -23,0 +25,0 @@ "dependencies": { |
@@ -38,3 +38,3 @@ This library contains various utilities designed for working with the HTML5 Canvas. It facilitates operations like creating, copying, cropping, trimming, flipping, merging, resizing and rotating canvases. | ||
The functions can be neatly composed to quickly | ||
The functions can be neatly composed to create utilities: | ||
@@ -50,3 +50,6 @@ ```js | ||
const resizeAndCropPreviewImage = (image) => | ||
Canvas.fromImage(image).crop('1:1').resize({ width: 250 }).toElement(); | ||
Canvas.fromImage(image) | ||
.crop('1:1') | ||
.resize({ width: 250 }) | ||
.toElement(); | ||
``` | ||
@@ -56,2 +59,6 @@ | ||
## [2.0.0] - 2021-08-01 | ||
Full TypeScript rewrite. | ||
## [1.2.0] - 2021-08-01 | ||
@@ -58,0 +65,0 @@ |
import resolve from '@rollup/plugin-node-resolve'; | ||
import typescript from '@rollup/plugin-typescript'; | ||
export default { | ||
input: 'src/index.js', | ||
input: 'src/index.ts', | ||
output: { | ||
sourcemap: true, | ||
file: 'dist/bundle.js', | ||
format: 'esm' | ||
file: 'dev/bundle.js', | ||
format: 'esm', | ||
declaration: true | ||
}, | ||
plugins: [ resolve() ] | ||
plugins: [ resolve(), typescript() ] | ||
}; |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
No tests
QualityPackage does not have any tests. This is a strong signal of a poorly maintained or low quality package.
Found 1 instance in 1 package
89
242.31%1292
1.02%1
-50%86
8.86%79292
-20%5
150%1
Infinity%