Skip to content
Closed
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
35 changes: 35 additions & 0 deletions js/build.mjs
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
import { NodeModulesExternal } from "@finos/perspective-esbuild-plugin/external.js";
import { build } from "@finos/perspective-esbuild-plugin/build.js";
<<<<<<< before updating
import { BuildCss } from "@prospective.co/procss/target/cjs/procss.js";
import cpy from "cpy";
import fs from "fs";
import { createRequire } from "node:module";
import path from "node:path";
=======
import { transform } from "lightningcss";
import { getarg } from "./tools/getarg.mjs";
import fs from "fs";
import cpy from "cpy";
>>>>>>> after updating

const require = createRequire(import.meta.url);

Expand Down Expand Up @@ -57,8 +64,36 @@ const BUILD = [
},
];

<<<<<<< before updating
function add(builder, path, path2) {
builder.add(path, fs.readFileSync(require.resolve(path2 || path)).toString());
=======
async function compile_css() {
const process_path = (path) => {
const outpath = path.replace("src/css", "dist/css");
fs.mkdirSync(outpath, { recursive: true });

fs.readdirSync(path, { withFileTypes: true }).forEach((entry) => {
const input = `${path}/${entry.name}`;
const output = `${outpath}/${entry.name}`;

if (entry.isDirectory()) {
process_path(input);
} else if (entry.isFile() && entry.name.endsWith(".css")) {
const source = fs.readFileSync(input);
const { code } = transform({
filename: entry.name,
code: source,
minify: !DEBUG,
sourceMap: false,
});
fs.writeFileSync(output, code);
}
});
};

process_path("src/css");
>>>>>>> after updating
}

async function compile_css() {
Expand Down
26 changes: 26 additions & 0 deletions js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"main": "./lib/index.js",
"scripts": {
"build": "node build.mjs",
<<<<<<< before updating
"clean": "rimraf dist",
"lint": "prettier --check \"src/**/*.js\" \"src/**/*.jsx\" \"src/style/*.css\" \"src/html/*.html\" \"*.mjs\" \"*.json\"",
"fix": "prettier --write \"src/**/*.js\" \"src/**/*.jsx\" \"src/style/*.css\" \"src/html/*.html\" \"*.mjs\" \"*.json\"",
Expand All @@ -29,13 +30,38 @@
"react-dom": "^19.2.4",
"react-icons": "^5.6.0",
"react-modern-drawer": "^1.4.0"
=======
"clean": "rm -rf dist playwright-report ../csp_gateway/extension",
"dev": "npm-run-all -p start watch",
"lint": "prettier --check \"src/**/*.{js,ts,jsx,tsx,css}\" \"tests/**/*.{js,ts,jsx,tsx}\" \"*.mjs\" \"*.json\"",
"fix": "prettier --write \"src/**/*.{js,ts,jsx,tsx,css}\" \"tests/**/*.{js,ts,jsx,tsx}\" \"*.mjs\" \"*.json\"",
"preinstall": "npx only-allow pnpm",
"prepack": "npm run build",
"start": "http-server -p 3000 -o examples/",
"start:tests": "http-server -p 3000 ",
"test": "TZ=UTC playwright test",
"watch": "nodemon --watch src -e ts,css,html --exec \"pnpm build:debug\""
>>>>>>> after updating
},
"devDependencies": {
<<<<<<< before updating
"@finos/perspective-esbuild-plugin": "3.2.1",
"@prospective.co/procss": "^0.1.18",
"cpy": "^13.2.1",
"esbuild": "^0.27.3",
"npm-run-all": "^4.1.5",
"prettier": "^3.8.1"
=======
"@finos/perspective-esbuild-plugin": "^3.2.1",
"@playwright/test": "^1.59.0",
"cpy": "^13.2.1",
"esbuild": "^0.27.2",
"lightningcss": "^1.29.3",
"http-server": "^14.1.1",
"nodemon": "^3.1.10",
"npm-run-all": "^4.1.5",
"prettier": "^3.8.1",
"typescript": "^6.0.2"
>>>>>>> after updating
}
}
Empty file added js/src/css/index.css
Empty file.
Loading