mirror of
https://github.com/visioncortex/vtracer.git
synced 2026-09-14 08:05:58 -07:00
Scope the npm package to @visioncortex/vtracer
Publish under the @visioncortex npm org. Add publishConfig.access=public for the scoped package and update the install/require examples in both READMEs.
This commit is contained in:
@@ -148,14 +148,14 @@ See [`crates/vtracer-py`](crates/vtracer-py/README.md) for the full API.
|
||||
|
||||
### Node.js Library
|
||||
|
||||
[`vtracer`](https://www.npmjs.com/package/vtracer) is available for Node as a WebAssembly build (from the [`nodejs`](nodejs/README.md) package) — image decoding and vectorization both run in wasm, so there is **no native dependency**.
|
||||
[`@visioncortex/vtracer`](https://www.npmjs.com/package/@visioncortex/vtracer) is available for Node as a WebAssembly build (from the [`nodejs`](nodejs/README.md) package) — image decoding and vectorization both run in wasm, so there is **no native dependency**.
|
||||
|
||||
```sh
|
||||
npm install vtracer
|
||||
npm install @visioncortex/vtracer
|
||||
```
|
||||
|
||||
```js
|
||||
const vtracer = require('vtracer');
|
||||
const vtracer = require('@visioncortex/vtracer');
|
||||
|
||||
await vtracer.convertFile('in.png', 'out.svg', { mode: 'polygon' });
|
||||
const svg = vtracer.convertBuffer(buffer, { preset: 'poster' });
|
||||
|
||||
+2
-2
@@ -8,13 +8,13 @@ just `npm install`.
|
||||
## Install
|
||||
|
||||
```sh
|
||||
npm install vtracer
|
||||
npm install @visioncortex/vtracer
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
const vtracer = require('vtracer');
|
||||
const vtracer = require('@visioncortex/vtracer');
|
||||
|
||||
// file in, file out
|
||||
await vtracer.convertFile('in.png', 'out.svg');
|
||||
|
||||
+4
-1
@@ -1,9 +1,12 @@
|
||||
{
|
||||
"name": "vtracer",
|
||||
"name": "@visioncortex/vtracer",
|
||||
"version": "1.0.0-alpha.1",
|
||||
"description": "Raster to vector graphics converter (SVG). WebAssembly build of the vtracer framework — no native dependencies.",
|
||||
"main": "index.js",
|
||||
"types": "index.d.ts",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"files": [
|
||||
"index.js",
|
||||
"index.d.ts",
|
||||
|
||||
Reference in New Issue
Block a user