Commit graph

2 commits

Author SHA1 Message Date
151aeb1e87 **chore: update tsconfig paths and bump version**
### Changes:
- **tsconfig.browser.json**:
  - Replaced `examples/**/*` with `demo/**/*` in the `include` paths.
- **src/utils/version.ts**:
  - Updated `VERSION` constant from `0.9.1` to `0.9.2`.

### Purpose:
Aligned the TypeScript configuration with the recent folder structure update for better organization. Incremented the version to `0.9.2` to reflect the latest improvements.
2025-06-23 10:58:29 -07:00
8eaf9f67cb **feat: add browser-compatible build configuration and environment detection**
### Changes:
- Added `rollup.unified.js` for building a unified bundle with environment detection (Node.js, Browser, Serverless).
- Added `rollup_config.js` for browser-specific bundle configurations.
- Created `tsconfig.browser.json` for browser builds and `tsconfig.unified.json` for unified builds.
- Implemented custom Rollup plugins:
  - **`fixThisReferences`**: Resolves `this` reference issues in TensorFlow files.
  - **`nodeModuleShims`**: Provides empty shims for Node.js built-in modules in browser environments.
- Updated dependencies in `package-lock.json` to include Rollup plugins and updated `buffer` dependency for polyfills.
- Created `src/unified.ts` as the unified library entry point with dynamic environment detection.

### Purpose:
- Introduced a unified and browser-compatible build pipeline to ensure `Brainy` can seamlessly operate across multiple environments (Node.js, Browser, Serverless).
- Resolved compatibility issues with Node.js modules and specific library builds.
- Enhanced flexibility and usability for developers working in diverse runtime environments.
2025-06-19 14:59:42 -07:00