Skip to content

Commit

Permalink
Refine static example
Browse files Browse the repository at this point in the history
  • Loading branch information
schlusslicht committed Mar 22, 2022
1 parent f39dc01 commit 00ee496
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 45 deletions.
77 changes: 35 additions & 42 deletions examples/static/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,67 +2,60 @@
<meta charset="utf-8">
<title>sgrud-example-static</title>

<!-- UMD -->
<!-- DOM -->

<script nomodule src="/node_modules/core-js-bundle/minified.js"></script>
<angular-component name="sgrud-example-static">
<small>Child says hello, too!</small>
</angular-component>

<fast-component name="sgrud-example-static">
<small>Child says hello, too!</small>
</fast-component>

<script nomodule src="/node_modules/@babel/runtime/runtimify.js"></script>
<script nomodule src="/node_modules/comlink/dist/umd/comlink.min.js"></script>
<script nomodule src="/node_modules/rxjs/dist/bundles/rxjs.umd.min.js"></script>
<script nomodule src="/node_modules/tslib/tslib.js"></script>
<lit-component name="sgrud-example-static">
<small>Child says hello, too!</small>
</lit-component>

<script nomodule src="/node_modules/@sgrud/core/index.umd.js"></script>
<script nomodule src="/node_modules/@sgrud/bus/index.umd.js"></script>
<script nomodule src="/node_modules/@sgrud/data/index.umd.js"></script>
<script nomodule src="/node_modules/@sgrud/shell/index.umd.js"></script>
<script nomodule src="/node_modules/@sgrud/state/index.umd.js"></script>
<preact-component name="sgrud-example-static">
<small>Child says hello, too!</small>
</preact-component>

<script nomodule>
new sgrud.core.Kernel(undefined, '/package.json#');
</script>
<sgrud-component name="sgrud-example-static">
<small>Child says hello, too!</small>
</sgrud-component>

<!-- ESM -->

<script async
src="/node_modules/es-module-shims/dist/es-module-shims.js">
</script>
<script async src="./node_modules/es-module-shims/dist/es-module-shims.js"></script>

<script type="importmap-shim">
{
"imports": {
"@babel/runtime/helpers/": "/node_modules/@babel/runtime/helpers/esm/",
"@sgrud/bus": "/node_modules/@sgrud/bus/index.esm.js",
"@sgrud/core": "/node_modules/@sgrud/core/index.esm.js",
"@sgrud/data": "/node_modules/@sgrud/data/index.esm.js",
"@sgrud/shell": "/node_modules/@sgrud/shell/index.esm.js",
"@sgrud/state": "/node_modules/@sgrud/state/index.esm.js",
"comlink": "/node_modules/comlink/dist/esm/comlink.min.js",
"rxjs": "/node_modules/rxjs/dist/esm/index.js",
"rxjs/ajax": "/node_modules/rxjs/dist/esm/ajax/index.js",
"tslib": "/node_modules/tslib/tslib.es6.js"
"@babel/runtime/helpers/": "./node_modules/@babel/runtime/helpers/esm/",
"@sgrud/core": "./node_modules/@sgrud/core/index.esm.js",
"comlink": "./node_modules/comlink/dist/esm/comlink.min.js",
"rxjs": "./node_modules/rxjs/dist/esm/index.js",
"rxjs/ajax": "./node_modules/rxjs/dist/esm/ajax/index.js",
"tslib": "./node_modules/tslib/tslib.es6.js"
}
}
</script>

<script type="module-shim">
import { Kernel } from '@sgrud/core';
new Kernel(undefined, '/package.json#');
new Kernel(undefined, './package.json#');
</script>

<!-- DOM -->

<angular-component name="sgrud-example-static">
<small>Child says hello, too!</small>
</angular-component>
<!-- UMD -->

<fast-component name="sgrud-example-static">
<small>Child says hello, too!</small>
</fast-component>
<script nomodule src="./node_modules/@babel/runtime/runtimify.js"></script>
<script nomodule src="./node_modules/comlink/dist/umd/comlink.min.js"></script>
<script nomodule src="./node_modules/incremental-dom/dist/incremental-dom-min.js"></script>
<script nomodule src="./node_modules/rxjs/dist/bundles/rxjs.umd.min.js"></script>
<script nomodule src="./node_modules/tslib/tslib.js"></script>

<lit-component name="sgrud-example-static">
<small>Child says hello, too!</small>
</lit-component>
<script nomodule src="./node_modules/@sgrud/core/index.umd.js"></script>

<preact-component name="sgrud-example-static">
<small>Child says hello, too!</small>
</preact-component>
<script nomodule>
new sgrud.core.Kernel(undefined, './package.json#');
</script>
12 changes: 9 additions & 3 deletions examples/static/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,24 @@
"name": "sgrud-example-static",
"private": true,
"scripts": {
"preinstall": "npm pack ../../dist/* ../../skeletons/*/dist",
"preinstall": "npm pack --silent ../../skeletons/*/dist",
"install": "npm install --no-save ./*.tgz && rm ./*.tgz",
"start": "sgrud universal --host 0.0.0.0"
},
"dependencies": {
"core-js-bundle": "3.21.1",
"@sgrud/bin": "latest",
"@sgrud/bus": "latest",
"@sgrud/core": "latest",
"@sgrud/data": "latest",
"@sgrud/shell": "latest",
"@sgrud/state": "latest",
"es-module-shims": "1.5.1"
},
"sgrudDependencies": {
"sgrud-skeleton-angular": "latest",
"sgrud-skeleton-fast": "latest",
"sgrud-skeleton-lit": "latest",
"sgrud-skeleton-preact": "latest"
"sgrud-skeleton-preact": "latest",
"sgrud-skeleton-sgrud": "latest"
}
}

0 comments on commit 00ee496

Please sign in to comment.