Comparing version 1.2.0 to 2.0.0
{ | ||
"name": "svg64", | ||
"version": "1.2.0", | ||
"version": "2.0.0", | ||
"description": "Convert SVG to base64 anywhere", | ||
@@ -18,3 +18,12 @@ "keywords": [ | ||
"funding": "https://github.com/sponsors/scriptex", | ||
"main": "dist/svg64.js", | ||
"type": "module", | ||
"source": "src/svg64.ts", | ||
"exports": { | ||
"require": "./dist/svg64.cjs", | ||
"default": "./dist/svg64.modern.js" | ||
}, | ||
"main": "./dist/svg64.cjs", | ||
"types": "./dist/svg64.d.ts", | ||
"module": "./dist/svg64.module.js", | ||
"unpkg": "./dist/svg64.umd.js", | ||
"repository": { | ||
@@ -25,12 +34,11 @@ "type": "git", | ||
"scripts": { | ||
"js": "mkdir dist && uglifyjs src/svg64.js -o dist/svg64.js", | ||
"clean": "rm -rf dist && rm -rf demo/dist", | ||
"copy": "cp -r dist demo", | ||
"demo": "node ./demo/scripts/node.js", | ||
"build": "yarn clean && yarn js && yarn copy" | ||
"demo": "node ./demo/scripts/node.mjs", | ||
"build": "microbundle && yarn copy", | ||
"start": "microbundle watch" | ||
}, | ||
"dependencies": {}, | ||
"devDependencies": { | ||
"uglify-js": "3.17.2" | ||
"microbundle": "0.15.1" | ||
} | ||
} |
@@ -58,5 +58,7 @@ [![Travis CI](https://travis-ci.com/scriptex/svg64.svg?branch=master)](https://travis-ci.com/scriptex/svg64) | ||
### In a browser: | ||
### In a browser | ||
```javascript | ||
import svg64 from 'svg64'; // or use window.svg64.default | ||
// This is your SVG DOM element | ||
@@ -69,3 +71,3 @@ const svg = document.getElementById('svg'); | ||
// This is your SVG in base64 representation | ||
const base64fromSVG = window.svg64(svg); | ||
const base64fromSVG = svg64(svg); | ||
@@ -76,3 +78,3 @@ // Add the base64 image as a background to your element | ||
### In Node: | ||
### In Node | ||
@@ -97,3 +99,3 @@ ```javascript | ||
Check it out [here](https://sv64.atanas.info) | ||
Check it out [here](https://svg64.atanas.info) | ||
@@ -100,0 +102,0 @@ There is a simple demo illustrating how to use the SVG64 module in NodeJS. |
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
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
33660
13
199
Yes
102
1