Skip to content

Commit 7ec76b5

Browse files
authored
Merge pull request #2454 from sinistersnare/davis-assorted-cleanups
Fix Blocks build script execution
2 parents ccf9c2c + 3229aab commit 7ec76b5

8 files changed

Lines changed: 24 additions & 13 deletions

File tree

examples/blocks/index.mjs

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import * as fs from "fs";
1414
import { get_examples, LOCAL_EXAMPLES } from "./examples.js";
1515
import sh from "@finos/perspective-scripts/sh.mjs";
1616
import * as url from "url";
17+
import * as path from "node:path";
1718

1819
const version = JSON.parse(fs.readFileSync("./package.json")).version;
1920
const __dirname = url.fileURLToPath(new URL(".", import.meta.url)).slice(0, -1);
@@ -69,16 +70,17 @@ export async function dist_examples(
6970
`${outpath}/${name}/${filename}`,
7071
filecontents
7172
);
72-
73-
if (filename.endsWith("build.mjs")) {
74-
console.log("Building " + name);
75-
const script = `${outpath}/${name}/build.mjs`;
76-
sh`node ${script}`.runSync();
77-
}
7873
} else if (filename !== ".git") {
7974
sh`cp ${__dirname}/src/${name}/${filename} ${outpath}/${name}/${filename}`.runSync();
8075
}
8176
}
77+
78+
// build
79+
if (fs.existsSync(path.join(outpath, name, "build.mjs"))) {
80+
console.log("Building " + name);
81+
const script = `${outpath}/${name}/build.mjs`;
82+
sh`node ${script}`.runSync();
83+
}
8284
}
8385
}
8486
}

examples/blocks/package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,8 @@
1717
"@finos/perspective-viewer-openlayers": "^2.7.0",
1818
"@finos/perspective-workspace": "^2.7.0",
1919
"superstore-arrow": "3.0.0"
20+
},
21+
"devDependencies": {
22+
"esbuild": "^0.14.54"
2023
}
2124
}
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
Demo of [Perspective](https://github.com/finos/perspective).
22

33
This example of a `<perspective-workspace>` dashboard is generated from one
4-
[Apache Arrow]() source dataset, converted originally from this [XLS from a
5-
Tableau presentation](https://community.tableau.com/docs/DOC-1236).
4+
[Apache Arrow](https://arrow.apache.org/) source dataset,
5+
converted originally from this
6+
[XLS from a Tableau presentation](https://community.tableau.com/docs/DOC-1236).
67
This layout is just an example; you can explore your own visualizations in the Perspective
78
configuration menu, accessed by clicking the dropdown arrow in each pane's upper
89
left, or advanced options in the pane's right-click context menu.

packages/perspective-viewer-datagrid/test/js/superstore.spec.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
import { test } from "@playwright/test";
1414
import {
1515
compareContentsToSnapshot,
16-
compareLightDOMContents,
1716
run_standard_tests,
1817
} from "@finos/perspective-test";
1918

rust/perspective-viewer/src/rust/custom_elements/copy_dropdown.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,9 @@ impl CopyDropDownMenuElement {
5858
borrowed.as_apierror()?.hide()
5959
}
6060

61+
/// Internal Only.
62+
///
63+
/// Set this custom element model's raw pointer.
6164
#[allow(clippy::not_unsafe_ptr_arg_deref)]
6265
pub fn unsafe_set_model(&self, ptr: *const PerspectiveViewerElement) {
6366
let model = unsafe { ptr.as_ref().unwrap() };

rust/perspective-viewer/src/rust/custom_elements/export_dropdown.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,9 @@ impl ExportDropDownMenuElement {
5858
borrowed.as_apierror()?.hide()
5959
}
6060

61+
/// Internal Only.
62+
///
63+
/// Set this custom element model's raw pointer.
6164
#[allow(clippy::not_unsafe_ptr_arg_deref)]
6265
pub fn unsafe_set_model(&self, ptr: *const PerspectiveViewerElement) {
6366
let model = unsafe { ptr.as_ref().unwrap() };

rust/perspective-viewer/src/rust/session.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ impl Session {
212212
.create_replace_expression_update(&old_expr, new_expr)
213213
}
214214

215-
/// Validate an expression strin and marshall the results.
215+
/// Validate an expression string and marshall the results.
216216
pub async fn validate_expr(
217217
&self,
218218
expr: &str,

tools/perspective-scripts/sh.mjs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -254,9 +254,9 @@ class Command extends Function {
254254
* @returns {string} A command with the missing argument's flags removed.
255255
* @example
256256
* console.assert(
257-
* bash`run -t${1} -u"${undefined}" task`,
258-
* `run -t1 task`
259-
* );s
257+
* sh`run -t${1} -u"${undefined}" task`,
258+
* sh`run -t1 task`
259+
* );
260260
*/
261261
const sh = new Proxy(Command, {
262262
apply(...args) {

0 commit comments

Comments
 (0)