@pandino/pandino
v0.8.31
Published
The reference implementation of the Pandino API specification
Downloads
8
Readme
Pandino
This is the reference implementation of the Pandino Framework API.
Context
This package is part of the pandino-root monorepo. For detailed information about what is Pandino / how this package fits into the ecosystem, please consult with the related documentation(s).
Adding Pandino to a plain JavaScript project
<script type="module">
import loaderConfiguration from 'https://unpkg.com/@pandino/loader-configuration-dom/dist/loader-configuration-dom.mjs';
import Pandino from 'https://unpkg.com/@pandino/pandino/dist/esm/pandino.mjs';
const pandino = new Pandino({
...loaderConfiguration,
});
await pandino.init();
await pandino.start();
console.log(pandino.getBundleContext());
</script>
Adding Pandino to a TypeScript project (e.g. with Webpack)
Install Pandino via npm install --save @pandino/pandino @pandino/loader-configuration-dom
.
Initialize it somewhere close in you applications own init logic, e.g.:
import Pandino from '@pandino/pandino';
import loaderConfiguration from '@pandino/loader-configuration-dom';
const pandino = new Pandino({
...loaderConfiguration,
});
await pandino.init();
await pandino.start();
await pandino.getBundleContext().installBundle('some-bundle-manifest.json');
Adding Pandino to a NodeJS (CJS) project
Install Pandino via npm install --save @pandino/pandino @pandino/loader-configuration-nodejs
.
Initialize it somewhere close in you applications own init logic, e.g.:
const Pandino = require("@pandino/pandino");
const loaderConfiguration = require("@pandino/loader-configuration-nodejs");
const deploymentRoot = path.normalize(path.join(__dirname, 'deploy'));
const pandino = new Pandino({
...loaderConfiguration,
'pandino.deployment.root': deploymentRoot,
});
(async () => {
await pandino.init();
await pandino.start();
await pandino.getBundleContext().installBundle('some-bundle-manifest.json');
})();
License
Eclipse Public License - v 2.0