Commit graph

3 commits

Author SHA1 Message Date
Sanjay Bhangar
d51d3f60f1 Complete core ES module migration with build system and tests
- Enhanced build system to generate ESM, UMD, and minified formats
- Fixed test extraction script to properly parse OxJS inline tests
- Added comprehensive test infrastructure with Vitest
- Successfully extracted 22 test files from inline documentation
- Verified builds work in browser and Node.js environments
- Maintained full backward compatibility with Ox.load() pattern
- Updated .gitignore to exclude build artifacts (dev/, min/, dist/, test/extracted/)

Generated with AI assistance
2026-02-09 17:58:48 +05:30
Sanjay Bhangar
a8a7dc9445 Add core Ox modules as ES modules with tests
This commit adds ES module versions of fundamental Ox utilities:
- Array utilities (api, compact, unique, zip, etc.)
- String utilities (capitalize, clean, truncate, wordwrap, etc.)
- Math utilities (trig functions, geographic calculations, etc.)
- Object utilities (clone, serialize, keys/values, etc.)
- Function utilities (cache, debounce, throttle, memoize, etc.)
- Constants (math, time, colors, HTTP status codes)
- Polyfills for older browser compatibility

All modules include proper imports/exports and maintain the same API
as the original implementations. Added comprehensive test coverage with
31 tests passing.

Next steps: Convert remaining core modules, set up build pipeline,
and test backward compatibility with existing examples.

🤖 Generated with AI assistance
2026-02-09 17:32:06 +05:30
Sanjay Bhangar
4c880728dc Begin ES modules migration and modern build infrastructure
This commit lays the foundation for migrating OxJS from its custom module
system to ES modules while maintaining backward compatibility.

Key changes:
- Set up npm project with Vite for modern build tooling
- Created ES module versions of core Ox utilities (Type, Collection, DOM, etc.)
- Implemented compatibility layer for legacy Ox.load() pattern
- Added Vitest for testing with initial test suite
- Created script to extract existing inline tests from documentation
- Updated .gitignore for Node.js/npm development

The migration preserves OxJS's innovative inline test system and maintains
backward compatibility. Original source files remain unchanged.

Next steps include migrating UI modules, replacing the Python build script,
and creating npm package distribution.

🤖 Generated with AI assistance
2026-02-09 17:17:52 +05:30