{"id":16799884,"url":"https://github.com/lmnzx/reson","last_synced_at":"2026-01-03T05:55:46.437Z","repository":{"id":216050564,"uuid":"733542866","full_name":"lmnzx/reson","owner":"lmnzx","description":null,"archived":false,"fork":false,"pushed_at":"2024-01-08T06:46:55.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-23T14:46:29.018Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Makefile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lmnzx.png","metadata":{"files":{"readme":"README.md","changelog":null,"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}},"created_at":"2023-12-19T15:04:47.000Z","updated_at":"2023-12-19T15:04:53.000Z","dependencies_parsed_at":"2024-01-08T08:04:01.483Z","dependency_job_id":null,"html_url":"https://github.com/lmnzx/reson","commit_stats":null,"previous_names":["lmnzx/reson"],"tags_count":0,"template":false,"template_full_name":"melange-re/melange-opam-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lmnzx%2Freson","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lmnzx%2Freson/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lmnzx%2Freson/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lmnzx%2Freson/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lmnzx","download_url":"https://codeload.github.com/lmnzx/reson/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243976474,"owners_count":20377691,"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-13T09:30:01.810Z","updated_at":"2026-01-03T05:55:46.394Z","avatar_url":"https://github.com/lmnzx.png","language":"Makefile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# melange-opam-template\n\nA simple project template using [Melange](https://github.com/melange-re/melange)\nwith [opam](https://opam.ocaml.org/).\n\nIf you are looking for a template with esy, check [melange-esy-template](https://github.com/melange-re/melange-esy-template).\n\n## Quick Start\n\n```shell\nmake init\n\n# In separate terminals:\nmake watch\nmake serve\n```\n\nWhen running `make init`, you may encounter an error like this:\n\n```\n[ERROR] Could not determine which packages to install for this switch:\n  * Missing dependency:\n    - melange \u003e= 1.0.0\n    no matching version\n```\n\nIt means `opam` doesn't have the latest packages definitions from the opam-repository. To address this, first run `opam update`, then rerun `make init`.\n\n### React\n\nReact support is provided by\n[`reason-react`](https://github.com/reasonml/reason-react/). The entry\npoint of the sample React app is [`src/ReactApp.re`](src/ReactApp.re).\n\n## Commands\n\nIn opam / dune projects, our personal preference is to group commonly used commands in a Makefile. This is completely optional.\n\nYou can see all available commands by running `make help` or just `make`. Here\nare a few of the most useful ones:\n\n- `make init`: set up opam local switch and download OCaml, Melange and\nJavaScript dependencies\n- `make install`: install OCaml, Melange and JavaScript dependencies\n- `make watch`: watch for the filesystem and have Melange rebuild on every\nchange\n- `make serve`: serve the application with a local HTTP server\n\n## JavaScript output\n\nSince Melange compiles source files into JavaScript files, it can be used\nfor projects on any JavaScript platform - not just the browser.\n\nThe template includes two `melange.emit` stanza for two separate apps. This\nstanza tells Dune to generate JavaScript files using Melange, and specifies in\nwhich folder the JavaScript files should be placed, by leveraging the `target`\nfield:\n- The React app JavaScript files will be placed in `_build/default/src/output/*`.\n- The NodeJS app JavaScript files will be placed in `_build/default/src/node/*`.\n\nSo for example, [`src/Hello.ml`](src/Hello.ml) (using OCaml syntax) can be run with\n`node`:\n\n```bash\nnode _build/default/src/node/src/Hello.js\n```\n\nSimilarly, `_build/default/src/output/src/ReactApp.js` can be passed as entry to a bundler\nlike Webpack:\n\n```bash\nwebpack --mode production --entry ./_build/default/src/output/src/ReactApp.js\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flmnzx%2Freson","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flmnzx%2Freson","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flmnzx%2Freson/lists"}