Skip to content

Commit

Permalink
merge ig pub and our js pages
Browse files Browse the repository at this point in the history
  • Loading branch information
niquola committed Oct 3, 2024
1 parent 939aec3 commit 694230e
Show file tree
Hide file tree
Showing 15 changed files with 208 additions and 106 deletions.
3 changes: 3 additions & 0 deletions sushi-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ menu:
Overview: index.html
View Definition: StructureDefinition-ViewDefinition.html
Artifacts: artifacts.html
Playground: extra/playground.html
Tests: extra/tests.html
Implementations: extra/impls.html
Contributing: contributing.html

# ╭───────────────────────────Less Common Implementation Guide Properties──────────────────────────╮
Expand Down
2 changes: 1 addition & 1 deletion test_report/public/implementations.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"name": "Ref.Impl",
"url": "https://github.com/FHIR/sql-on-fhir-v2",
"description": "Official reference implementation in JavaScript",
"testResultsUrl": "https://fhir.github.io/sql-on-fhir-v2/test-results.json"
"testResultsUrl": "https://sql-on-fhir.org/extra/test-results.json"
},
{
"name": "Aidbox",
Expand Down
18 changes: 18 additions & 0 deletions test_report/public/impls.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset='utf-8'>
<meta name='viewport' content='width=device-width,initial-scale=1'>

<title>SOF tests</title>

<link rel='icon' type='image/png' href='favicon.png'>
<link rel='stylesheet' href='global.css'>
<link rel='stylesheet' href='build/bundle.css'>

<script defer src='build/implsb.js'></script>
</head>

<body>
</body>
</html>
18 changes: 18 additions & 0 deletions test_report/public/playground.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset='utf-8'>
<meta name='viewport' content='width=device-width,initial-scale=1'>

<title>SOF tests</title>

<link rel='icon' type='image/png' href='favicon.png'>
<link rel='stylesheet' href='global.css'>
<link rel='stylesheet' href='build/bundle.css'>

<script defer src='build/playgroundb.js'></script>
</head>

<body>
</body>
</html>
18 changes: 18 additions & 0 deletions test_report/public/tests.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset='utf-8'>
<meta name='viewport' content='width=device-width,initial-scale=1'>

<title>SOF tests</title>

<link rel='icon' type='image/png' href='favicon.png'>
<link rel='stylesheet' href='global.css'>
<link rel='stylesheet' href='build/bundle.css'>

<script defer src='build/testsb.js'></script>
</head>

<body>
</body>
</html>
146 changes: 86 additions & 60 deletions test_report/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,72 +10,98 @@ import sveltePreprocess from 'svelte-preprocess';
const production = !process.env.ROLLUP_WATCH;

function serve() {
let server;
let server;

function toExit() {
if (server) server.kill(0);
}
function toExit() {
if (server) server.kill(0);
}

return {
writeBundle() {
if (server) return;
server = require('child_process').spawn('npm', ['run', 'start', '--', '--dev'], {
stdio: ['ignore', 'inherit', 'inherit'],
shell: true
});
return {
writeBundle() {
if (server) return;
server = require('child_process').spawn('npm', ['run', 'start', '--', '--dev'], {
stdio: ['ignore', 'inherit', 'inherit'],
shell: true
});

process.on('SIGTERM', toExit);
process.on('exit', toExit);
}
};
process.on('SIGTERM', toExit);
process.on('exit', toExit);
}
};
}

export default {
input: 'src/main.js',
output: {
sourcemap: true,
format: 'iife',
name: 'app',
file: 'public/build/bundle.js',
globals: {}
},
plugins: [
json(),
svelte({
preprocess: sveltePreprocess({ postcss: true }),
compilerOptions: {
// enable run-time checks when not in production
dev: !production
}
}),
// we'll extract any component CSS out into
// a separate file - better for performance
css({ output: 'bundle.css' }),
let plugins = [
json(),
svelte({
preprocess: sveltePreprocess({ postcss: true }),
compilerOptions: {
// enable run-time checks when not in production
dev: !production
}
}),
// we'll extract any component CSS out into
// a separate file - better for performance
css({ output: 'bundle.css' }),

// If you have external dependencies installed from
// npm, you'll most likely need these plugins. In
// some cases you'll need additional configuration -
// consult the documentation for details:
// https://github.com/rollup/plugins/tree/master/packages/commonjs
resolve({
browser: true,
dedupe: ['svelte']
}),
commonjs(),
// If you have external dependencies installed from
// npm, you'll most likely need these plugins. In
// some cases you'll need additional configuration -
// consult the documentation for details:
// https://github.com/rollup/plugins/tree/master/packages/commonjs
resolve({
browser: true,
dedupe: ['svelte']
}),
commonjs(),

// In dev mode, call `npm run start` once
// the bundle has been generated
!production && serve(),
// In dev mode, call `npm run start` once
// the bundle has been generated
!production && serve(),

// Watch the `public` directory and refresh the
// browser on changes when not in production
!production && livereload('public'),
// Watch the `public` directory and refresh the
// browser on changes when not in production
!production && livereload('public'),

// If we're building for production (npm run build
// instead of npm run dev), minify
production && terser()
],
watch: {
clearScreen: false
}
};
// If we're building for production (npm run build
// instead of npm run dev), minify
production && terser()
];

export default [
{
input: 'src/implse.js',
output: {
sourcemap: true,
format: 'iife',
name: 'app',
file: 'public/build/implsb.js',
globals: {}
},
plugins: plugins,
watch: { clearScreen: false }
},
{
input: 'src/testse.js',
output: {
sourcemap: true,
format: 'iife',
name: 'app',
file: 'public/build/testsb.js',
globals: {}
},
plugins: plugins,
watch: { clearScreen: false }
},
{
input: 'src/playgrounde.js',
output: {
sourcemap: true,
format: 'iife',
name: 'app',
file: 'public/build/playgroundb.js',
globals: {}
},
plugins: plugins,
watch: { clearScreen: false }
}
];
42 changes: 0 additions & 42 deletions test_report/src/App.svelte

This file was deleted.

9 changes: 9 additions & 0 deletions test_report/src/ImplsApp.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<script>
import Nav from './Nav.svelte';
import Impls from './Impls.svelte';
</script>

<Nav/>
<Impls/>

23 changes: 23 additions & 0 deletions test_report/src/Nav.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<script>
import Tailwindcss from './Tailwindcss.svelte';
let prefix = "/extra"
let items = [
{title: "Overview", href: "/index.html"},
{title: "View Definition", href: "/StructureDefinition-ViewDefinition.html"},
{title: "Artifacts", href: "/artifacts.html"},
{title: "Playground", href: prefix + "/playground.html"},
{title: "Tests", href: prefix + "/tests.html"},
{title: "Implementations", href: prefix + "/impls.html"},
{title: "Contributing", href: "/contributing.html"}
]
</script>

<Tailwindcss />
<div class="flex space-x-4 px-4 py-1 border-b items-center text-white" style="background-color: #525ebb;">
{#each items as item}
<a href="{item.href}" class="px-2 hover:text-white hover:bg-gray-150">{item.title}</a>
{/each}
</div>
8 changes: 8 additions & 0 deletions test_report/src/PlaygroundApp.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<script>
import Nav from './Nav.svelte';
import Playground from './Playground.svelte';
</script>

<Nav/>
<Playground/>
2 changes: 0 additions & 2 deletions test_report/src/Tests.svelte
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
<script>
import { onMount } from "svelte";
export let name;
export let menu = [];
export let impls = [];
export let current = {};
Expand Down
7 changes: 7 additions & 0 deletions test_report/src/TestsApp.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<script>
import Tests from './Tests.svelte';
import Nav from './Nav.svelte';
</script>

<Nav/>
<Tests/>
2 changes: 1 addition & 1 deletion test_report/src/main.js → test_report/src/implse.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import App from './App.svelte';
import App from './ImplsApp.svelte';

const app = new App({
target: document.body,
Expand Down
8 changes: 8 additions & 0 deletions test_report/src/playgrounde.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import App from './PlaygroundApp.svelte';

const app = new App({
target: document.body,
props: {}
});

export default app;
8 changes: 8 additions & 0 deletions test_report/src/testse.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import App from './TestsApp.svelte';

const app = new App({
target: document.body,
props: {}
});

export default app;

0 comments on commit 694230e

Please sign in to comment.