html-to-image
Advanced tools
Comparing version 1.7.0 to 1.8.0
@@ -0,1 +1,13 @@ | ||
# [1.8.0](https://github.com/bubkoo/html-to-image/compare/v1.7.0...v1.8.0) (2021-09-15) | ||
### Bug Fixes | ||
* š ternary to convert slot assignedNodes to array ([#168](https://github.com/bubkoo/html-to-image/issues/168)) ([d12f4e2](https://github.com/bubkoo/html-to-image/commit/d12f4e210deaa179f9db5e36119964750d8ef45f)) | ||
### Features | ||
* āØ update deps ([8dd487a](https://github.com/bubkoo/html-to-image/commit/8dd487abfa9c12ee9c3553043cd5f21c87a78f91)) | ||
# [1.7.0](https://github.com/bubkoo/html-to-image/compare/v1.6.2...v1.7.0) (2021-07-23) | ||
@@ -2,0 +14,0 @@ |
{ | ||
"name": "html-to-image", | ||
"version": "1.7.0", | ||
"version": "1.8.0", | ||
"description": "Generates an image from a DOM node using HTML5 canvas and SVG.", | ||
@@ -25,3 +25,3 @@ "main": "lib/index.js", | ||
"scripts": { | ||
"lint": "tslint ./src/*.ts -c tslint.json -p tsconfig.json --fix", | ||
"lint": "eslint 'src/**/*.{js,ts}?(x)' --fix", | ||
"clean": "rimraf dist es lib", | ||
@@ -34,7 +34,7 @@ "build:esm": "tsc --module esnext --target es2015 --outDir ./es", | ||
"test": "karma start", | ||
"test-debug": "karma start --browsers=Chrome --single-run=false --debug", | ||
"test-watch": "karma start --browsers=Chrome --single-run=false --auto-watch", | ||
"test:watch": "karma start --single-run=false --auto-watch", | ||
"test:debug": "karma start --browsers=Chrome --single-run=false --auto-watch --debug", | ||
"coveralls": "cat ./test/coverage/lcov.info | coveralls", | ||
"pretest": "rimraf ./test/coverage", | ||
"prepare": "run-s build" | ||
"prepare": "is-ci || husky install .husky" | ||
}, | ||
@@ -49,7 +49,7 @@ "husky": { | ||
"lint-staged": { | ||
"src/**/*.ts": [ | ||
"tslint -c tslint.json -p ./tsconfig.json --fix" | ||
], | ||
"**/*.{js,jsx,tsx,ts,less,md,json}": [ | ||
"pretty-quick ā staged" | ||
], | ||
"*.ts": [ | ||
"eslint --fix" | ||
] | ||
@@ -62,2 +62,5 @@ }, | ||
}, | ||
"release": { | ||
"extends": "@bubkoo/semantic-release-config" | ||
}, | ||
"license": "MIT", | ||
@@ -79,15 +82,18 @@ "authors": { | ||
"devDependencies": { | ||
"@commitlint/cli": "^11.0.0", | ||
"@commitlint/config-conventional": "^11.0.0", | ||
"@fortawesome/fontawesome-free": "^5.15.1", | ||
"@rollup/plugin-commonjs": "^15.1.0", | ||
"@rollup/plugin-node-resolve": "^9.0.0", | ||
"@rollup/plugin-typescript": "^6.0.0", | ||
"@types/jasmine": "^3.6.0", | ||
"@types/jquery": "^3.5.3", | ||
"coveralls": "^3.1.0", | ||
"devmoji": "^2.1.9", | ||
"husky": "^4.3.0", | ||
"@commitlint/cli": "^13.1.0", | ||
"@commitlint/config-conventional": "^13.1.0", | ||
"@fortawesome/fontawesome-free": "^5.15.4", | ||
"@rollup/plugin-commonjs": "^20.0.0", | ||
"@rollup/plugin-node-resolve": "^13.0.4", | ||
"@rollup/plugin-typescript": "^8.2.5", | ||
"@types/jasmine": "^3.9.1", | ||
"@types/jquery": "^3.5.6", | ||
"@typescript-eslint/eslint-plugin": "^4.18.0", | ||
"@typescript-eslint/parser": "^4.18.0", | ||
"coveralls": "^3.1.1", | ||
"devmoji": "^2.3.0", | ||
"husky": "^7.0.2", | ||
"imagediff": "^1.0.8", | ||
"jasmine-core": "^3.6.0", | ||
"is-ci": "^3.0.0", | ||
"jasmine-core": "^3.9.0", | ||
"karma": "^5.2.3", | ||
@@ -98,21 +104,21 @@ "karma-chrome-launcher": "^3.1.0", | ||
"karma-spec-reporter": "^0.0.32", | ||
"karma-typescript": "^5.2.0", | ||
"lint-staged": "^10.4.2", | ||
"karma-typescript": "^5.3.0", | ||
"lint-staged": "^11.1.2", | ||
"npm-run-all": "^4.1.5", | ||
"prettier": "^2.1.2", | ||
"pretty-quick": "^3.1.0", | ||
"rimraf": "^3.0.0", | ||
"rollup": "^2.32.1", | ||
"rollup-plugin-filesize": "^9.0.0", | ||
"prettier": "^2.4.0", | ||
"pretty-quick": "^3.1.1", | ||
"rimraf": "^3.0.2", | ||
"rollup": "^2.56.3", | ||
"rollup-plugin-filesize": "^9.1.1", | ||
"rollup-plugin-terser": "^7.0.2", | ||
"tslib": "^2.0.0", | ||
"tslint": "^6.1.3", | ||
"tslint-config-airbnb": "^5.11.2", | ||
"tslint-config-prettier": "^1.18.0", | ||
"tslint-eslint-rules": "^5.4.0", | ||
"typescript": "^4.0.3" | ||
"tslib": "^2.3.1", | ||
"eslint": "^7.22.0", | ||
"eslint-config-airbnb-base": "^14.2.1", | ||
"eslint-config-prettier": "^8.1.0", | ||
"eslint-plugin-eslint-comments": "^3.2.0", | ||
"eslint-plugin-import": "^2.22.1", | ||
"eslint-plugin-prettier": "^3.3.1", | ||
"eslint-plugin-promise": "^4.3.1", | ||
"typescript": "^4.4.3" | ||
}, | ||
"release": { | ||
"extends": "@bubkoo/semantic-release-config" | ||
}, | ||
"repository": { | ||
@@ -119,0 +125,0 @@ "type": "git", |
@@ -186,2 +186,18 @@ <h1 align="center">html-to-image</h1> | ||
You can add filter to every image function. For example, | ||
```js | ||
const filter = (node)=>{ | ||
const exclusionClasses = ['remove-me', 'secret-div']; | ||
return !exclusionClasses.some(classname=>node.classList.includes(classname)); | ||
} | ||
htmlToImage.toJpeg(node, { quality: 0.95, filter: filter}); | ||
``` | ||
or | ||
```js | ||
htmlToImage.toPng(node, {filter:filter}) | ||
``` | ||
Not called on the root node. | ||
@@ -243,10 +259,10 @@ | ||
### fontEmbedCss | ||
### fontEmbedCSS | ||
When supplied, the library will skip the process of parsing and embedding webfont URLs in CSS, | ||
instead using this value. This is useful when combined with `.getFontEmbedCss()` to only perform the | ||
When supplied, the library will skip the process of parsing and embedding webfont URLs in CSS, | ||
instead using this value. This is useful when combined with `getFontEmbedCSS()` to only perform the | ||
embedding process a single time across multiple calls to library functions. | ||
```javascript | ||
const fontEmbedCss = await htmlToImage.getFontEmbedCss(element1); | ||
const fontEmbedCss = await htmlToImage.getFontEmbedCSS(element1); | ||
html2Image.toSVG(element1, { fontEmbedCss }); | ||
@@ -253,0 +269,0 @@ html2Image.toSVG(element2, { fontEmbedCss }); |
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
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
Empty package
Supply chain riskPackage does not contain any code. It may be removed, is name squatting, or the result of a faulty package publish.
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
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
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
316
2
20293
39
4
0
1