Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .copier-answers.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Changes here will be overwritten by Copier
_commit: 9be318c
_commit: 9b579a3
_src_path: https://github.com/python-project-templates/base.git
add_docs: false
add_extension: js
Expand Down
1 change: 0 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ Makefile linguist-documentation
*.html text=auto eol=lf
*.js text=auto eol=lf
*.json text=auto eol=lf
*.less text=auto eol=lf
*.md text=auto eol=lf
*.py text=auto eol=lf
*.toml text=auto eol=lf
Expand Down
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -112,11 +112,12 @@ dmypy.json
/site
index.md
docs/_build/
docs/src/_build/
docs/api
docs/index.md
docs/html
docs/index.md
docs/jupyter_execute
docs/src/_build/
docs/superpowers
index.md

# JS
Expand Down
69 changes: 4 additions & 65 deletions js/build.mjs
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import { build } from "@finos/perspective-esbuild-plugin/build.js";
import { BuildCss } from "@prospective.co/procss/target/cjs/procss.js";
import cpy from "cpy";
import { build } from "./tools/build.js";
import { compile } from "./tools/css.js";
import fs from "fs";
import { createRequire } from "node:module";
import cpy from "cpy";

const BUILD = [
{
Expand All @@ -26,66 +25,6 @@ const BUILD = [
},
];

const require = createRequire(import.meta.url);
function add(builder, path, path2) {
builder.add(path, fs.readFileSync(require.resolve(path2 || path)).toString());
}

async function compile_css() {
const builder1 = new BuildCss("");
add(builder1, "./src/index.css");
add(
builder1,
"perspective-viewer-pro.css",
"@perspective-dev/viewer/dist/css/pro.css",
);
add(
builder1,
"perspective-viewer-pro-dark.css",
"@perspective-dev/viewer/dist/css/pro-dark.css",
);
add(
builder1,
"perspective-viewer-monokai.css",
"@perspective-dev/viewer/dist/css/monokai.css",
);
add(
builder1,
"perspective-viewer-vaporwave.css",
"@perspective-dev/viewer/dist/css/vaporwave.css",
);
add(
builder1,
"perspective-viewer-dracula.css",
"@perspective-dev/viewer/dist/css/dracula.css",
);
add(
builder1,
"perspective-viewer-gruvbox.css",
"@perspective-dev/viewer/dist/css/gruvbox.css",
);
add(
builder1,
"perspective-viewer-gruvbox-dark.css",
"@perspective-dev/viewer/dist/css/gruvbox-dark.css",
);
add(
builder1,
"perspective-viewer-solarized.css",
"@perspective-dev/viewer/dist/css/solarized.css",
);
add(
builder1,
"perspective-viewer-solarized-dark.css",
"@perspective-dev/viewer/dist/css/solarized-dark.css",
);

const css = builder1.compile().get("index.css");

// write to extension
fs.writeFileSync("./dist/index.css", css);
}

async function build_all() {
/* make directories */
fs.mkdirSync("../raydar/dashboard/static/", { recursive: true });
Expand All @@ -107,7 +46,7 @@ async function build_all() {
);

/* Compile css */
await compile_css();
await compile();

/* Copy to raydar static */
await cpy("./dist/*", "../raydar/dashboard/static/", {
Expand Down
8 changes: 3 additions & 5 deletions js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
"build": "npm-run-all -s build:*",
"clean": "rm -rf dist playwright-report ../raydar/dashboard/static",
"dev": "npm-run-all -p start watch",
"lint": "prettier --check \"src/**/*.{js,ts,jsx,tsx,less,css}\" \"*.mjs\" \"*.json\"",
"fix": "prettier --write \"src/**/*.{js,ts,jsx,tsx,less,css}\" \"*.mjs\" \"*.json\"",
"lint": "prettier --check \"src/**/*.{js,ts,jsx,tsx,css}\" \"*.mjs\" \"*.json\"",
"fix": "prettier --write \"src/**/*.{js,ts,jsx,tsx,css}\" \"*.mjs\" \"*.json\"",
"preinstall": "npx only-allow pnpm",
"prepack": "npm run build",
"test": ":",
Expand All @@ -48,11 +48,9 @@
"@perspective-dev/workspace": "^4.3.0"
},
"devDependencies": {
"@finos/perspective-esbuild-plugin": "^3.2.1",
"@prospective.co/procss": "^0.1.18",
"cpy": "^13.2.1",
"esbuild": "^0.27.2",
"esbuild-plugin-less": "^1.3.35",
"lightningcss": "^1.29.3",
"mkdirp": "^3.0.1",
"npm-run-all": "^4.1.5",
"prettier": "^3.8.1"
Expand Down
Loading
Loading