Skip to content

Commit

Permalink
Use @xmldom/xmldom instead of xmldom
Browse files Browse the repository at this point in the history
  • Loading branch information
TooTallNate committed Oct 14, 2023
1 parent d326b8d commit 4b71ec3
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 20 deletions.
5 changes: 2 additions & 3 deletions apps/svg/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,12 @@
},
"license": "MIT",
"devDependencies": {
"@types/xmldom": "^0.1.31",
"esbuild": "^0.17.19",
"nxjs-pack": "workspace:^",
"nxjs-runtime": "workspace:^"
},
"dependencies": {
"canvg": "^4.0.1",
"xmldom": "^0.6.0"
"@xmldom/xmldom": "^0.8.10",
"canvg": "^4.0.1"
}
}
4 changes: 2 additions & 2 deletions apps/svg/src/main.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { Canvg } from 'canvg';
import { DOMParser } from 'xmldom';
import { DOMParser } from '@xmldom/xmldom';

// From: https://commons.wikimedia.org/wiki/File:Ghostscript_Tiger.svg
const svgData = Switch.readFileSync('romfs:/Ghostscript_Tiger.svg');
const svgData = Switch.readFileSync(new URL('Ghostscript_Tiger.svg', Switch.entrypoint));
const svg = new TextDecoder().decode(svgData);

const canvas = Switch.screen;
Expand Down
23 changes: 8 additions & 15 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 4b71ec3

Please sign in to comment.