- Via NPM:
Install NPM package - https://www.npmjs.com/package/lightbox-module:
npm i lightbox-module
- The other way, you also can inject
lightbox.js
file into your HTML code:
<script src="/path/to/dist/lightbox.js"></script>
<script lang="ts">
import { onMount } from "svelte";
import lighbox from "lightbox-module";
onMount(() => {
lighbox();
});
</script>
$ yarn install
$ yarn dev
$ yarn build
or:
$ npm run build
The dist
folder is automatically created and include file lightbox.min.js
[MIT]