-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #72 from jonmmease/jonmmease/fix_deno
Fix deno example
- Loading branch information
Showing
5 changed files
with
22 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
import * as vega from "https://cdn.skypack.dev/pin/[email protected]/mode=imports/optimized/vega.js" | ||
import * as avenger from "../../avenger-vega-renderer/dist_deno/js/index.js" | ||
import { viewToPng } from "../../avenger-vega-renderer/dist-deno/js/index.js" | ||
|
||
var spec = { | ||
"$schema": "https://vega.github.io/schema/vega/v5.json", | ||
|
@@ -111,5 +111,5 @@ var spec = { | |
|
||
const runtime = vega.parse(spec); | ||
const view = new vega.View(runtime, {renderer: 'none'}); | ||
const png = await avenger.viewToPng(view); | ||
const png = await viewToPng(view); | ||
Deno.writeFile("chart.png", png); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,6 +35,20 @@ npm pack && | |
mv avenger-vega-renderer-*.tgz packed | ||
""" | ||
|
||
[tasks.build-vega-renderer-deno] | ||
cwd = "avenger-vega-renderer" | ||
cmd = """ | ||
rm -rf lib/ && | ||
deno run -A jsr:@deno/[email protected] -p avenger-vega-renderer -p avenger-vega-renderer --no-default-features --features "deno" --sync && | ||
rm -rf dist-deno/ && | ||
mkdir -p dist-deno/ && | ||
cp -r js dist-deno/js && | ||
cp -r lib dist-deno/ && | ||
cp package.json dist-deno/ | ||
""" | ||
|
||
[tasks.publish-rs] | ||
cmd = """ | ||
cargo publish -p avenger && | ||
|