Skip to content

v0.20.0 - add a dependency management system

Compare
Choose a tag to compare
@sansyrox sansyrox released this 27 Dec 16:44
· 11 commits to main since this release

What's Changed

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