Repository navigation
ES6 Update
v5.0.0: Modernization & ES Modules
This major release completely modernizes the SCOBot library, transitioning from a legacy IIFE/Global architecture to a standard ES Module system with modern tooling.
🚀 Key Features
- ES Modules: Native ESM support. Import only what you need:
import { SCOBot } from 'scobot'. - Modern Architecture: All core logic refactored into ES6 Classes (
SCOBot,SCOBotBase,SCOBotUtil). - TypeScript Support: Includes generated type definitions (
.d.ts) for better DX. - Local Persistence: The Mock API (
SCOBot_API_1484_11) now persists student data tolocalStorage, allowing for resumable sessions during local testing. - Data Compression: Built-in support for
lz-stringto compresssuspend_databefore sending to the LMS.
🛠 Tooling & Infrastructure
- Vite: Fast build system generating both ESM (
dist/scobot.js) and UMD (dist/scobot.umd.js) bundles. - Vitest: Modern unit testing suite replacing QUnit.
- CI/CD: Automated testing and NPM publishing via GitHub Actions.
⚠️ Breaking Changes
- Module System: The library is now primarily an ES Module. While a UMD bundle is provided for legacy script tags, the recommended usage is via
import. - Global Layout:
SCOBotdoes not automatically attach to the globalwindowobject unless you explicitly do so or use the UMD build. - Configuration:
Gruntfile.jsand.travis.ymlhave been removed in favor ofvite.config.jsand GitHub Actions.