{"id":15497522,"url":"https://github.com/bcomnes/uland-isomorphic","last_synced_at":"2025-04-22T22:27:23.163Z","repository":{"id":37952078,"uuid":"403734118","full_name":"bcomnes/uland-isomorphic","owner":"bcomnes","description":"Isomorphic exports of uland","archived":false,"fork":false,"pushed_at":"2024-10-24T18:23:31.000Z","size":45,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-29T19:34:25.430Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/bcomnes.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/funding.yml","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":["bcomnes"],"custom":["https://bret.io"]}},"created_at":"2021-09-06T19:14:22.000Z","updated_at":"2024-10-24T18:23:34.000Z","dependencies_parsed_at":"2023-01-28T23:55:16.721Z","dependency_job_id":"32295cc3-a5c5-44e1-b773-129bb81c4444","html_url":"https://github.com/bcomnes/uland-isomorphic","commit_stats":{"total_commits":39,"total_committers":3,"mean_commits":13.0,"dds":"0.28205128205128205","last_synced_commit":"9b17153b31822008cd182e1442a899b7e23e573d"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bcomnes%2Fuland-isomorphic","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bcomnes%2Fuland-isomorphic/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bcomnes%2Fuland-isomorphic/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bcomnes%2Fuland-isomorphic/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bcomnes","download_url":"https://codeload.github.com/bcomnes/uland-isomorphic/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249859776,"owners_count":21335995,"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-02T08:39:19.420Z","updated_at":"2025-04-22T22:27:23.105Z","avatar_url":"https://github.com/bcomnes.png","language":"JavaScript","funding_links":["https://github.com/sponsors/bcomnes","https://bret.io"],"categories":[],"sub_categories":[],"readme":"# uland-isomorphic\n[![Actions Status](https://github.com/bcomnes/uland-isomorphic/workflows/tests/badge.svg)](https://github.com/bcomnes/uland-isomorphic/actions)\n\nIsomorphic exports of [uland][uland]\n\n```\nnpm install uland-isomorphic\n```\n\n## Usage\n\nUse [uland][uland] or [uland-ssr][ssr] from a single import identifier depending on then environment you are running.\n\n``` js\nimport {Component, render, html, useState} from 'uland-isomorphic';\n\nconst Counter = Component((initialState) =\u003e {\n  const [count, setCount] = useState(initialState);\n  return html`\n  \u003cbutton onclick=${() =\u003e setCount(count + 1)}\u003e\n    Count: ${count}\n  \u003c/button\u003e`;\n});\n\n// basic example, show two independent counters\nrender(document.body, () =\u003e html`\n  \u003cdiv\u003e\n    A bounce of counters.\u003chr\u003e\n    ${Counter(0)} ${Counter(1)}\n  \u003c/div\u003e\n`);\n```\n\n## How\n\nWhile @webreflection recomends [require-overrides](https://github.com/WebReflection/require-overrides/#readme) in the offical documentation, that requires special flags or transforms to work.\n\n`uland-isomorphic` works by utilizing environment specific exports fields so that you can have dependency injection at the built-in module resolver layer.\nIt supports the following export fields:\n\n- `main` (cjs node)\n- `browser` (cjs browser)\n- `exports.import` (esm node)\n- `exports.reqire` (cjs node)\n- `exports.browser` (esm browser)\n\n## License\n\nMIT\n\n[uland]: https://github.com/WebReflection/uland\n[ssr]: https://github.com/WebReflection/uland-ssr\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbcomnes%2Fuland-isomorphic","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbcomnes%2Fuland-isomorphic","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbcomnes%2Fuland-isomorphic/lists"}