Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add json-schema validator #34

Merged
merged 3 commits into from
Jan 6, 2025
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
43 changes: 43 additions & 0 deletions servlets/json-schema/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
lib-cov
*.seed
*.log
*.csv
*.dat
*.out
*.pid
*.gz
*.swp

pids
logs
results
tmp

# Build
public/css/main.css

# Coverage reports
coverage

# API keys and secrets
.env

# Dependency directory
node_modules
bower_components

# Editors
.idea
*.iml

# OS metadata
.DS_Store
Thumbs.db

# Ignore built ts files
dist/**/*

# ignore yarn.lock
yarn.lock

*.wasm
4 changes: 4 additions & 0 deletions servlets/json-schema/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
node_modules
dist
.git

Empty file.
16 changes: 16 additions & 0 deletions servlets/json-schema/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
.PHONY: run clean

# Build target with caching - only rebuilds if source files change
dist/plugin.wasm: $(shell find src -name '*.ts')
xtp plugin build

# Run the WordPress categories list command
run: dist/plugin.wasm
./test.sh

# Clean built files
clean:
rm -f dist/plugin.wasm

# Default target
.DEFAULT_GOAL := run
12 changes: 12 additions & 0 deletions servlets/json-schema/esbuild.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
const esbuild = require('esbuild');

esbuild
.build({
entryPoints: ['src/index.ts'],
outdir: 'dist',
bundle: true,
sourcemap: true,
minify: false, // might want to use true for production build
format: 'cjs', // needs to be CJS for now
target: ['es2020'], // don't go over es2020 because quickjs doesn't support it
})
Loading
Loading