@kitschpatrol/vite-plugin-tldraw
Advanced tools
Comparing version 1.0.0 to 1.0.1
{ | ||
"name": "@kitschpatrol/vite-plugin-tldraw", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"type": "module", | ||
@@ -52,3 +52,3 @@ "description": "Vite plugin enabling module-like import of local tldraw .tldr files with automatic conversion to SVG or PNG.", | ||
"dependencies": { | ||
"@kitschpatrol/tldraw-cli": "^2.2.2" | ||
"@kitschpatrol/tldraw-cli": "^2.2.3" | ||
}, | ||
@@ -55,0 +55,0 @@ "devDependencies": { |
@@ -1,2 +0,2 @@ | ||
# @kitschpatrol/vite-plugin-tldr | ||
# @kitschpatrol/vite-plugin-tldraw | ||
@@ -16,3 +16,3 @@ [![NPM Package](https://img.shields.io/npm/v/@kitschpatrol/vite-plugin-tldraw.svg)](https://npmjs.com/package/@kitschpatrol/vite-plugin-tldraw) | ||
const body = document.querySelector<HTMLDivElement>('body') | ||
body.innerHTML = `<img src="${tldrImage}" />` | ||
if (body) body.innerHTML = `<img src="${tldrImage}" />` | ||
``` | ||
@@ -28,2 +28,4 @@ | ||
_For lower-level processing of `.tldr` files in Node projects or via the command line, please see [@kitschpatrol/tldraw-cli](https://github.com/kitschpatrol/tldraw-cli)._ | ||
## Installation | ||
@@ -36,3 +38,3 @@ | ||
```sh | ||
npm --install --save-dev @kitschpatrol/vite-plugin-tldr | ||
npm install --save-dev @kitschpatrol/vite-plugin-tldraw | ||
``` | ||
@@ -44,3 +46,3 @@ | ||
// vite.config.ts | ||
import tldrPlugin from './src/plugin' | ||
import tldrPlugin from '@kitschpatrol/vite-plugin-tldraw' | ||
import { defineConfig } from 'vite' | ||
@@ -62,3 +64,3 @@ | ||
"compilerOptions": { | ||
"types": ["vite-plugin-tldraw/ext"] | ||
"types": ["@kitschpatrol/vite-plugin-tldraw/ext"] | ||
} | ||
@@ -125,3 +127,3 @@ } | ||
// vite.config.ts | ||
import tldrPlugin from './src/plugin' | ||
import tldrPlugin from '@kitschpatrol/vite-plugin-tldraw' | ||
import { defineConfig } from 'vite' | ||
@@ -135,3 +137,3 @@ | ||
The plugin also exports `TldrawPluginOptions` and `TldrawImageOptions` types for your convenience. | ||
The `@kitschpatrol/vite-plugin-tldraw` also exports `TldrawPluginOptions` and `TldrawImageOptions` types for your convenience. | ||
@@ -174,2 +176,4 @@ ## Import path options | ||
This tool is not a part of the official tldraw project, and it is currently only tested and known to be compatible with tldraw 2.0.0-beta.2. | ||
Behind the scenes, the plugin calls [@kitschpatrol/tldraw-cli](https://github.com/kitschpatrol/tldraw-cli)'s Node API to generate image files from `.tldr` files, and then passes the resulting URL as the value of the module import. | ||
@@ -191,4 +195,2 @@ | ||
This tool is not a part of the official tldraw project. | ||
I'm consciously releasing this tool under the `@kitschpatrol` namespace on NPM to leave the `vite-plugin-tldraw` package name available to the core tldraw project. | ||
@@ -200,3 +202,3 @@ | ||
**Typescript module compatibility with URLSearchParams:** | ||
**TypeScript module compatibility with URLSearchParams:** | ||
@@ -203,0 +205,0 @@ - <https://github.com/microsoft/TypeScript/issues/38638> |
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
51223
210