Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use bundling #30

Merged
merged 4 commits into from
Feb 29, 2024
Merged

Use bundling #30

merged 4 commits into from
Feb 29, 2024

Conversation

superstar54
Copy link
Owner

@superstar54 superstar54 commented Feb 29, 2024

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

  • Use the release version
  • run npm run build
  • python -m build
  • twine upload dist/*

@superstar54 superstar54 force-pushed the bundling branch 7 times, most recently from 22d1466 to 56fd4c5 Compare February 29, 2024 22:40
@superstar54 superstar54 merged commit 19aad06 into main Feb 29, 2024
12 checks passed
@superstar54 superstar54 deleted the bundling branch February 29, 2024 22:51
superstar54 added a commit that referenced this pull request Feb 29, 2024
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.

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

If we want to use the release version from unpkg

- Use the release version
- run `npm run build`
- python -m build
- twine upload dist/*
superstar54 added a commit that referenced this pull request Feb 29, 2024
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.

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

If we want to use the release version from unpkg

- Use the release version
- run `npm run build`
- python -m build
- twine upload dist/*
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