Skip to content

Installation

There are three ways to install RepoWidget. Choose the one that fits your workflow.

The fastest way to get started. Add this script tag before your closing </body> tag:

<!-- jsDelivr CDN (recommended) -->
<script src="https://cdn.jsdelivr.net/npm/repowidget/dist/repoWidget.min.js"></script>
<!-- or unpkg CDN -->
<!-- <script src="https://unpkg.com/repowidget/dist/repoWidget.min.js"></script> -->

The CDN build is always in sync with the latest npm release and requires no local tooling.

Install via npm (or your preferred package manager) if you’re using a bundler:

Terminal window
npm install repowidget

Then import in your JavaScript or TypeScript file:

import { createRepoWidget } from 'repowidget';

If you prefer modules without a local install:

<script type="module">
import { createRepoWidget } from 'https://cdn.jsdelivr.net/npm/repowidget/dist/repoWidget.esm.js';
createRepoWidget({
username: 'your-username',
containerId: 'repo-container',
});
</script>

After adding the script, open your browser’s developer console and type:

typeof createRepoWidget

If it returns "function", the widget loaded correctly.