Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions .github/actions/build_component_wheels/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,21 @@ outputs:
runs:
using: 'composite'
steps:
- name: Install build backend for PEP 517
working-directory: ${{ github.action_path }}/../../../
shell: bash
run: pip install build

- name: Link develop version of streamlit-component-lib
if: inputs.custom_streamlit_component_lib_file != ''
working-directory: ${{ github.action_path }}/../../../
shell: bash
env:
STREAMLIT_COMPONENT_LIB_FILE: ${{ inputs.custom_streamlit_component_lib_file }}
run: |
find examples template template-reactless -name frontend -maxdepth 3 | while IFS= read -r line; do
find examples templates -maxdepth 5 -type d -name frontend -print0 | while IFS= read -r -d '' line; do
(
cd "${line}";
npm install "${STREAMLIT_COMPONENT_LIB_FILE}"
cd "${line}" && npm install "${STREAMLIT_COMPONENT_LIB_FILE}"
)
done

Expand All @@ -44,8 +48,7 @@ runs:
working-directory: ${{ github.action_path }}/../../../
shell: bash
run: |
find examples template template-reactless -maxdepth 3 -name '__init__.py' |\
xargs -n 1 sed -i 's/_RELEASE = False/_RELEASE = True/';
grep -Rl "_RELEASE = False" examples templates | xargs -r sed -i 's/_RELEASE = False/_RELEASE = True/';
./dev.py all-python-build-package

- name: Set outputs
Expand Down
12 changes: 12 additions & 0 deletions .github/replay-files/v2/template.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"cookiecutter": {
"author_name": "John Smith",
"author_email": "[email protected]",
"project_name": "Streamlit Component X",
"package_name": "streamlit-custom-component",
"import_name": "my_component",
"description": "Streamlit component that allows you to do X",
"open_source_license": "MIT license",
"framework": "React + Typescript"
}
}
7 changes: 6 additions & 1 deletion dev.py
Original file line number Diff line number Diff line change
Expand Up @@ -339,14 +339,19 @@ class CookiecutterVariant(typing.NamedTuple):

COOKIECUTTER_VARIANTS = [
CookiecutterVariant(
replay_file=THIS_DIRECTORY / ".github" / "replay-files" / "template.json",
replay_file=THIS_DIRECTORY
/ ".github"
/ "replay-files"
/ "v1"
/ "template.json",
repo_directory=THIS_DIRECTORY / "templates" / "v1" / "template",
cookiecutter_dir=THIS_DIRECTORY / "cookiecutter" / "v1",
),
CookiecutterVariant(
replay_file=THIS_DIRECTORY
/ ".github"
/ "replay-files"
/ "v1"
/ "template-reactless.json",
repo_directory=THIS_DIRECTORY / "templates" / "v1" / "template-reactless",
cookiecutter_dir=THIS_DIRECTORY / "cookiecutter" / "v1",
Expand Down