{"id":21062135,"url":"https://github.com/ahrefs/reshowcase","last_synced_at":"2025-05-16T01:31:49.508Z","repository":{"id":40469502,"uuid":"445562447","full_name":"ahrefs/reshowcase","owner":"ahrefs","description":"A tool to create demos for your ReasonReact components","archived":false,"fork":false,"pushed_at":"2024-09-21T14:38:37.000Z","size":2085,"stargazers_count":4,"open_issues_count":9,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-11-14T20:08:07.713Z","etag":null,"topics":["melange","ocaml","reason","reason-react","reasonml"],"latest_commit_sha":null,"homepage":"https://ahrefs.github.io/reshowcase/","language":"Reason","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"bloodyowl/reshowcase","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ahrefs.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES.md","contributing":null,"funding":null,"license":"LICENSE","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},"funding":{"github":["bloodyowl"]}},"created_at":"2022-01-07T15:14:18.000Z","updated_at":"2024-10-02T18:57:56.000Z","dependencies_parsed_at":"2024-09-15T03:59:54.559Z","dependency_job_id":null,"html_url":"https://github.com/ahrefs/reshowcase","commit_stats":{"total_commits":233,"total_committers":7,"mean_commits":"33.285714285714285","dds":0.5321888412017167,"last_synced_commit":"f7edef4438fbbc93c2c6f8cb107df65fbaaae4f9"},"previous_names":[],"tags_count":32,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahrefs%2Freshowcase","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahrefs%2Freshowcase/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahrefs%2Freshowcase/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahrefs%2Freshowcase/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ahrefs","download_url":"https://codeload.github.com/ahrefs/reshowcase/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225398770,"owners_count":17468277,"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":["melange","ocaml","reason","reason-react","reasonml"],"created_at":"2024-11-19T17:37:24.175Z","updated_at":"2024-11-19T17:37:24.899Z","avatar_url":"https://github.com/ahrefs.png","language":"Reason","funding_links":["https://github.com/sponsors/bloodyowl"],"categories":[],"sub_categories":[],"readme":"# Reshowcase\n\n⚠️ this is a fork of [original tool](https://github.com/bloodyowl/reshowcase) with the following updates:\n- Migrated to use Melange and Dune, instead of ReScript and Ninja\n- Use `reason-react` instead of `rescript-react`\n- Use Reason syntax instead of ReScript syntax\n\n\u003e A tool to create demos for your Reason React components\n\n![Screenshot](./example/example-2021.png)\n\n```reason\nopen Reshowcase.Entry;\n\n/* Create a demo*/\ndemo(({addDemo: _, addCategory}) =\u003e {\n  /* Add a category */\n  addCategory(\"Title\", ({addDemo, addCategory: _}) =\u003e {\n    /* Add an example*/\n    addDemo(\"normal\", ({string, _})\n      /* Register \"handles\" from your JSX directly*/\n      =\u003e \u003ch1\u003e {string(\"text\", \"hello\")-\u003eReact.string} \u003c/h1\u003e);\n    addDemo(\"font-size\", ({string, int, _}) =\u003e\n      \u003ch1\n        style={ReactDOM.Style.make(\n          /* Handles can be strings, ints, floats and booleans*/\n          ~fontSize=\n            {let size =\n               int(\"font size\", {min: 0, max: 100, initial: 30, step: 1});\n             size-\u003eBelt.Int.toString ++ {js|px|js}},\n          (),\n        )}\u003e\n        {string(\"text\", \"hello\")-\u003eReact.string}\n      \u003c/h1\u003e\n    );\n  });\n  /* Add another category */\n  addCategory(\"Button\", ({addDemo, addCategory: _}) =\u003e\n    addDemo(\"normal\", ({string, bool, _}) =\u003e\n      \u003cbutton disabled={bool(\"disabled\", false)}\u003e\n        {string(\"text\", \"hello\")-\u003eReact.string}\n      \u003c/button\u003e\n    )\n  );\n});\n\nstart();\n```\n\n## Install\n\nInstall [opam](https://opam.ocaml.org/) package manager.\n\nThen:\n\n```\nopam pin add reshowcase.dev git+https://github.com/ahrefs/reshowcase.git#main\n```\n\nThis will make the NodeJS script `reshowcase` available in your opam switch.\n\nTo make sure this script works, add the following dependencies to your application `package.json`:\n```json\n  \"devDependencies\": {\n    \"@craftamap/esbuild-plugin-html\": \"https://github.com/denis-ok/esbuild-plugin-html#79f512f447eb98efa6b6786875f617a095eaaf09\"\n  }\n```\n\n## Usage\n\n### To start / develop:\n\n```console\n$ reshowcase start --entry=path/to/Demo.js\n```\n\n### To build bundle:\n\n```console\n$ reshowcase build --entry=path/to/Demo.js --output=path/to/bundle\n```\n\nIf you need custom esbuild options, create the `.reshowcase/config.js` and export the esbuild config. Plugins and modules will be merged.\n\nIf you need a custom template, pass `--template=./path/to/template.html`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fahrefs%2Freshowcase","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fahrefs%2Freshowcase","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fahrefs%2Freshowcase/lists"}