Skip to content

Local build#5

Open
xaptronic wants to merge 3 commits intomainfrom
local-build
Open

Local build#5
xaptronic wants to merge 3 commits intomainfrom
local-build

Conversation

@xaptronic
Copy link
Owner

Summary: Local Build Branch Changes

New Files

  • cli.py — CLI tool for building JS bundles
    • nicegui-aggrid-enterprise build — runs npm install + build
    • nicegui-aggrid-enterprise clean — removes dist/node_modules
    • nicegui-aggrid-enterprise --help — usage info

Modified Files

pyproject.toml

  • Added CLI entry point: [project.scripts]
  • Changed build config to exclude dist folders (instead of including them as artifacts)
  • Source files (package.json, rollup.config.mjs, src/*.mjs) are now included

aggrid.py

  • Added _check_bundle_exists() helper function
  • Both AgGridEnterprise and AgGridEnterpriseCharts now check for bundles on init
  • Raises helpful RuntimeError with build instructions if missing

.gitignore

  • Added dist/ and dist-enterprise-charts/ to ignore list

User Flow Change

Before (pre-built):

pip install nicegui-aggrid-enterprise
# Ready to use

After (local build):

pip install nicegui-aggrid-enterprise
nicegui-aggrid-enterprise build  # Requires Node.js
# Ready to use

Why?

AG Grid Enterprise licensing may prohibit redistributing the bundled JavaScript. This approach ensures users build with their own license on their own machine.

- Update AG Grid Enterprise from 33.3.2 to 35.0.0
- Switch to ESM module bundling with Rollup (matches NiceGUI 3.0+ architecture)
- Add new theming API with automatic dark mode support
- Add from_pandas() and from_polars() class methods
- Add property setters for theme, options, html_columns, auto_size_columns
- Use built-in autoSizeStrategy instead of manual sizeColumnsToFit()
- Change default theme from 'balham' to 'quartz'
- Rename JS component to aggrid_enterprise.js to avoid collision with built-in
- Requires NiceGUI >= 3.0.0
- Add test_app.py for testing
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant