Comparing version 1.0.2 to 1.2.0
{ | ||
"name": "idcrop", | ||
"version": "1.0.2", | ||
"description": | ||
"Embed for cropping images and returning a base64 of the cropped area.", | ||
"version": "1.2.0", | ||
"description": "Embed for cropping images and returning a base64 of the cropped area.", | ||
"main": "dist/js/bundle.min.js", | ||
"files": ["dist"], | ||
"files": [ | ||
"dist" | ||
], | ||
"scripts": { | ||
"build": "webpack --progress -p -d", | ||
"watch": "webpack --progress --watch -d", | ||
"start": "webpack-dev-server --open -d" | ||
"start": "webpack-dev-server --open -d", | ||
"lint": "./node_modules/.bin/eslint ./lib/js/*.js", | ||
"fix": "./node_modules/.bin/eslint ./lib/js/*.js --fix" | ||
}, | ||
@@ -17,3 +20,8 @@ "repository": { | ||
}, | ||
"keywords": ["idwall", "crop", "image", "upload"], | ||
"keywords": [ | ||
"idwall", | ||
"crop", | ||
"image", | ||
"upload" | ||
], | ||
"author": "Beatriz Rizental", | ||
@@ -26,4 +34,8 @@ "license": "MIT", | ||
"css-loader": "^0.28.7", | ||
"eslint": "^4.12.1", | ||
"eslint-plugin-json": "^1.2.0", | ||
"eslint-plugin-prettier": "^2.3.1", | ||
"extract-text-webpack-plugin": "^3.0.2", | ||
"node-sass": "^4.6.1", | ||
"prettier": "^1.8.2", | ||
"sass-loader": "^6.0.6", | ||
@@ -30,0 +42,0 @@ "style-loader": "^0.19.0", |
# IdCrop | ||
Embed for cropping images and returning a base64 of the cropped area. | ||
[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier) | ||
### Development Environment Setup | ||
Image cropper utility that crops an image in any polygonal shape chosen and returns a base64 of the cropped area. | ||
```bash | ||
$ npm install & npm start | ||
``` | ||
### Usage | ||
@@ -22,5 +18,12 @@ | ||
idcrop.init('toolbarContainer', 'displayContainer', 'previewContainer') | ||
idcrop.init('toolbarContainer', 'displayContainer', 'previewContainer', 4) | ||
``` | ||
The paramenters for the `init` function are, in order: | ||
- The id of the container you want the toolbar to render at. | ||
- The id of the container you want the display to render at. | ||
- The id of the container you want the preview to render at. | ||
- The number of sides you want the cropping polygon to have. | ||
###### HTML | ||
@@ -49,1 +52,20 @@ | ||
``` | ||
### Development Environment Setup | ||
```bash | ||
$ npm install & npm start | ||
``` | ||
###### Linting | ||
We use a combination of eslint and prettier for the formatting and linting of our JS code. | ||
```bash | ||
$ npm run lint | ||
$ npm run fix | ||
``` | ||
### License | ||
Copyright © 2017, [Idwall](https://idwall.co/). Released under the [MIT license](https://github.com/idwall/idcrop/LICENSE). |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
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
56162
5
70
0
14