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
This commit is contained in:
parent
91b6deaf7f
commit
4c880728dc
16 changed files with 7465 additions and 12 deletions
51
package.json
Normal file
51
package.json
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
{
|
||||
"name": "oxjs",
|
||||
"version": "0.2.0",
|
||||
"description": "OxJS is a JavaScript UI framework",
|
||||
"main": "dist/ox.umd.js",
|
||||
"module": "dist/ox.esm.js",
|
||||
"exports": {
|
||||
".": {
|
||||
"import": "./dist/ox.esm.js",
|
||||
"require": "./dist/ox.umd.js",
|
||||
"script": "./dist/ox.min.js"
|
||||
},
|
||||
"./ui": {
|
||||
"import": "./dist/ox.ui.esm.js",
|
||||
"require": "./dist/ox.ui.umd.js"
|
||||
}
|
||||
},
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
"build": "vite build",
|
||||
"test": "vitest",
|
||||
"test:run": "vitest run",
|
||||
"extract-tests": "node scripts/extract-tests.js",
|
||||
"lint": "eslint source",
|
||||
"preview": "vite preview"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/oxjs/oxjs.git"
|
||||
},
|
||||
"keywords": [
|
||||
"ui",
|
||||
"framework",
|
||||
"javascript",
|
||||
"utilities"
|
||||
],
|
||||
"author": "0x2620",
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"@vitejs/plugin-legacy": "^5.2.0",
|
||||
"eslint": "^8.56.0",
|
||||
"glob": "^10.3.10",
|
||||
"jsdom": "^28.0.0",
|
||||
"postcss": "^8.4.33",
|
||||
"postcss-import": "^16.0.0",
|
||||
"postcss-nesting": "^12.0.2",
|
||||
"rollup": "^4.9.5",
|
||||
"vite": "^5.0.11",
|
||||
"vitest": "^1.2.1"
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue