Skip to content

Add option for src=<file>.py #21

Open
@AlbertDeFusco

Description

@AlbertDeFusco

Instead of copying the contents of the script into the HTML I would like to have the option to declare the path to the source input.

I will submit a PR for this use case shortly.

For example (the new flag is only a suggestion, a better recommended name or default behavior is appreciated)

> pyscript wrap --no-copy-source input-file.py -o index.html
> cat index.html
<!DOCTYPE html>
<html lang="en">
<head>
    <title>PyScript App</title>
    <link rel="stylesheet" href="https://pyscript.net/alpha/pyscript.css"/>
    <script defer src="https://pyscript.net/alpha/pyscript.js"></script>
</head>
<body>
    <py-script src="input-file.py"></py-script>
</body>
</html>

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions