superstar54 / weas-widget

A widget to visualize and edit atomic structures in Jupyter Notebook
https://weas-widget.readthedocs.io/en/latest/index.html
MIT License
19 stars 3 forks source link

Use bundling #30

Closed superstar54 closed 6 months ago

superstar54 commented 6 months ago

weas and weas-widget are separate repos, but if we want to debug/develop a new feature of weas for the widget, using bundling makes the development more convenient.

The js code was moved to the js folder, run npm run build-watch will bundle these assets into the src/weas_widget/static folder, and watch the changes.

Use local weas

If we want to use the weas package, then clone the weas repo, and the two repo folders are in the same level.

import * as weas from "../../weas/src/index.js";
import "./widget.css";

Use release weas version

If we want to use the release version from unpkg

import * as weas from "https://unpkg.com/weas/dist/weas.mjs";
import "./widget.css";

Publish Python package