Installation
Node.js
In server-side Node.js projects, the @mtkruto/node
package can be used.
$ pnpm install @mtkruto/node
$ yarn add @mtkruto/node
$ npm install @mtkruto/node
It supports both ECMAScript and CommonJS.
Deno
MTKruto is available on deno.land/x.
No setup is required, but here’s an import map entry for it in case you use one.
"mtkruto/": "https://deno.land/x/[email protected]/",
Web
- If your project is developed using Node.js with a framework like (Next.js,
SvelteKit, etc.) or a bundler (Parcel, Vite, etc.), use the
@mtkruto/browser
package.
$ pnpm install @mtkruto/browser
$ yarn add @mtkruto/browser
$ npm install @mtkruto/browser
-
If your project is developed using Deno with a framework like Fresh or Ultra, it is the same case as above.
-
You can also import it directly from a CDN into your HTML file.
<!DOCTYPE html>
<html>
<body>
<script type="module">
import { ... } from "https://esm.sh/@mtkruto/[email protected]";
</script>
</body>
</html>
Bun
The recommended way to use MTKruto with Bun is through JSR.
$ bunx jsr add @mtkruto/mtkruto