jBase-2/wiki/Installation.md
2026-05-17 12:39:25 +02:00

1.7 KiB

1. Browser (Legacy / Static)

Download the jbase.min.js file, upload it to your server, and include it in your HTML.

<script src="/path/to/js/jbase.min.js"></script>

<script>
  // jBase is now available via '$' or 'jBase'
  $(document).ready(() => {
      console.log("jBase is ready!");
  });
</script>

-- OR --

via CDN

<!-- CDN: jsDelivr @latest Version -->
<script src="https://cdn.jsdelivr.net/npm/@k37z3r/jbase/dist/jbase.min.js"></script>

<!-- CDN: Statically @latest version -->
<script src="https://cdn.statically.io/npm/@k37z3r/jbase/dist/jbase.min.js"></script>

<!-- CDN: jsDelivr @2.2.0 Version -->
<script src="https://cdn.jsdelivr.net/gh/k37z3r/jBase-2@2.2.0/dist/jbase.min.js"></script>

<!-- CDN: Statically @2.2.0 Version -->
<script src="https://cdn.statically.io/gh/k37z3r/jBase-2@2.2.0/dist/jbase.min.js"></script>

<!-- Use one of the examples above. You can find further examples in the jsDelivr or Statically documentation -->

<script>
  // jBase is now available via '$' or 'jBase'
  $(document).ready(() => {
      console.log("jBase is ready!");
  });
</script>

2. Node.js / Bundlers (Webpack, Vite, Rollup) coming soon

If you are using a modern stack or server-side rendering (SSR), you can import jBase as a module.

npm install @k37z3r/jbase
# or
yarn add @k37z3r/jbase

Usage in TypeScript/ESM:

import { $ } from 'jbase';

// Use as usual
$('.element').addClass('active');

Usage in CommonJS (Node.js require):

const { $ } = require('jbase');
$('.element').addClass('active');