{"id":16272986,"url":"https://github.com/wch/componenttemplate","last_synced_at":"2025-04-08T15:51:01.548Z","repository":{"id":169439244,"uuid":"645418438","full_name":"wch/componenttemplate","owner":"wch","description":"Template for Shiny components","archived":false,"fork":false,"pushed_at":"2023-06-23T14:49:39.000Z","size":109,"stargazers_count":1,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-14T12:31:21.113Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wch.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-05-25T15:52:03.000Z","updated_at":"2024-11-11T22:59:31.000Z","dependencies_parsed_at":null,"dependency_job_id":"b48081c5-19ec-49e5-83c9-bc85c7cab1b5","html_url":"https://github.com/wch/componenttemplate","commit_stats":{"total_commits":31,"total_committers":1,"mean_commits":31.0,"dds":0.0,"last_synced_commit":"a966f6fb7458572fd7663a9f9ad3edbd7d8a56cb"},"previous_names":["wch/shinycomponenttemplate","wch/componenttemplate"],"tags_count":0,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wch%2Fcomponenttemplate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wch%2Fcomponenttemplate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wch%2Fcomponenttemplate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wch%2Fcomponenttemplate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wch","download_url":"https://codeload.github.com/wch/componenttemplate/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247877682,"owners_count":21011153,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-10T18:21:02.778Z","updated_at":"2025-04-08T15:51:01.531Z","avatar_url":"https://github.com/wch.png","language":"TypeScript","readme":"Shiny component template\n========================\n\nThis repository contains a simple template of a Shiny component for both R and Python.\n\nThe folders are organized as follows:\n\n- `r`: R package\n- `py`: Python package\n- `js`: TypeScript code for the component\n\n\n## Using the component\n\n### R\n\nInstall the R package:\n\n```R\nremotes::install_github(\"wch/componenttemplate/r\")\n```\n\nAfter installing, you can run the demo app. Either copy and paste the [example app](r/inst/examples/number/app.R) into your R console, or run:\n\n```R\nshiny::runApp(system.file(\"examples/number\", package = \"componenttemplate\"))\n```\n\n\n### Python\n\nTo install the Python package:\n\n```bash\npip uninstall -y componenttemplate\npip install \"componenttemplate@git+https://github.com/wch/componenttemplate.git#subdirectory=py\"\n```\n\nAfter installing, you can run the demo app. Save the [example app](py/examples/number/app.py) to a file named app.py, and run it:\n\n```bash\nshiny run app.py --port 8000 --launch-browser\n```\n\nIf you have cloned the repository, you run the example app (without needing to create a new copy of the file):\n\n```bash\nshiny run py/examples/number/app.py --port 8000 --launch-browser\n```\n\n\n## Developing the component\n\nTo do development on the component, first clone this repository.\n\n### R\n\nYou can use devtools to install the R package from the sources on disk. First start R in the `r/` directory, then run:\n\n```R\ndevtools::install(\".\")\n```\n\nOr you can load the package from disk without installing. It will stay loaded for the duration of the R session.\n\n```R\ndevtools::load_all(\".\")\n```\n\n\n### Python\n\nTo install the Python package in development mode:\n\n```bash\n# Create a virtual environment - recommended but not required\npython -m venv venv\n. venv/bin/activate\n\ncd py\n\npip install -e .[dev]\n```\n\n\n### TypeScript\n\nThe component is written in TypeScript. To set up the build environment, install the dependencies:\n\n```bash\ncd js\nnpm i\n```\n\nTo build the component:\n\n```bash\nnpm run build\n```\n\n","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwch%2Fcomponenttemplate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwch%2Fcomponenttemplate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwch%2Fcomponenttemplate/lists"}