Installation
Find xuxi on:
Requirements
Before installing xuxi, make sure your environment meets the following requirements:
- TypeScript
4.5+(Recommended for type safety and best performance). - Enable
strictmode in yourtsconfig.json(Best practice for TypeScript projects).
TypeScript Configuration
Modify your tsconfig.json to enable strict mode:
{
"compilerOptions": {
"strict": true
}
}Install via Package Managers
To install xuxi in your project, use one of the following package managers:
Using a CDN
For quick usage in the browser without installing dependencies, you can include xuxi from a CDN:
UMD (Global Script)
<!-- Load the minified version from jsDelivr -->
<script src="https://cdn.jsdelivr.net/npm/xuxi@latest/lib/index.min.js"></script>ESM (Module Import)
<script type="module">
import xuxi from "https://cdn.jsdelivr.net/npm/xuxi@latest/+esm";
</script>Note:
- The UMD version loads
xuxias a global variable. - The ESM version allows importing as a module in modern browsers.
Now you are ready to start using xuxi! 🚀