v0.20.0 - add a dependency management system
What's Changed
- [pre-commit.ci] pre-commit autoupdate by @pre-commit-ci in this pull request
- Feature: Implementation of a method to add dependencies by @sansyrox in this pull request
To manage dependencies in your project, create a starfyre_config.toml
file in the root directory of your project. This file serves as a configuration for specifying dependencies. The format for declaring dependencies is as follows:
pyxide_packages = [] # for client-side packages
server_packages = [] # for server-side packages
[js_modules]
is_odd = "https://cdn.jsdelivr.net/npm/[email protected]/+esm"
Fireworks = "https://cdn.jsdelivr.net/npm/[email protected]/+esm"
Dependencies can be specified using the following commands:
python3 -m starfyre --add-pyxide-package="package-name"
python3 -m starfyre --add-server-package="package-name"
python3 -m starfyre --add-js-module="module-name" --as="alias"
Sample Usage
# client-side code
from pyscript.js_modules import Fireworks
from pyscript import document
container = document.querySelector("[data-pyxide-id='root']")
f = Fireworks.Fireworks.new(container)
f.start()
Full Changelog: v0.19.4...v0.20.0