{"id":15314270,"url":"https://github.com/barelyhuman/mono","last_synced_at":"2026-01-03T02:10:37.031Z","repository":{"id":101913140,"uuid":"370433527","full_name":"barelyhuman/mono","owner":"barelyhuman","description":"My monorepo templates , with an additional ESM supported setup ","archived":false,"fork":false,"pushed_at":"2024-07-18T14:26:29.000Z","size":478,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-02-26T15:40:03.228Z","etag":null,"topics":["cjs","esm","monorepo","nodejs","workspaces","yarn"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/barelyhuman.png","metadata":{"files":{"readme":"readme.md","changelog":"CHANGELOG.md","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},"funding":{"liberapay":"reaper","ko_fi":"barelyreaper","github":"barelyhuman","custom":"https://barelyreaper.gumroad.com/coffee"}},"created_at":"2021-05-24T17:29:08.000Z","updated_at":"2024-07-18T14:26:33.000Z","dependencies_parsed_at":null,"dependency_job_id":"ccad3adf-351e-405f-8546-564bc45b2b5f","html_url":"https://github.com/barelyhuman/mono","commit_stats":null,"previous_names":[],"tags_count":5,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/barelyhuman%2Fmono","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/barelyhuman%2Fmono/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/barelyhuman%2Fmono/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/barelyhuman%2Fmono/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/barelyhuman","download_url":"https://codeload.github.com/barelyhuman/mono/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243814856,"owners_count":20352037,"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":["cjs","esm","monorepo","nodejs","workspaces","yarn"],"created_at":"2024-10-01T08:44:55.665Z","updated_at":"2026-01-03T02:10:36.979Z","avatar_url":"https://github.com/barelyhuman.png","language":"JavaScript","funding_links":["https://liberapay.com/reaper","https://ko-fi.com/barelyreaper","https://github.com/sponsors/barelyhuman","https://barelyreaper.gumroad.com/coffee"],"categories":[],"sub_categories":[],"readme":"# mono\n\nSimple mono repo setups as a base for a generic\n\n- Shared\n- Components\n- Web\n- Core (Backend)\n\nfolder structure\n\n## Flavors\n\n- dev - generic build everything to older node(cjs) compatible code\n- esm - use modules (esm) and no backward compiling to have a pure esm setup\n- dev-modified - same as dev but uses `react-rewired` to avoid having to rebuild\n  components package again and again\n\n## Getting Started\n\nThe repository uses Yarn workspaces to handle the packages right now and you can\ndo the following to setup the base development environment.\n\n- Start by cloning the repo and switching to the needed flavor or download the\n  `tar.gz` of the respective flavor.\n- Then delete the `.git` folder if you cloned , don't have to delete if you\n  downloaded the tarball.\n\n```sh\n$ rm -rf .git\n```\n\n- Now make sure you have `yarn` installed and then just run\n\n```sh\n$ yarn  ​\n```\n\n## Documentations\n\n## main flavor\n\nThis is mostly a version that has been polished through trial and error of\nmultiple other projects built by me.\n\nI don't use monorepos a lot but this is based of the times where it was\nabsolutely needed\n\n### dev flavor\n\nThis is a generic flavor that most people could use if you are moving code from\nolder node version , basically \u003c v11 , as those versions of node don't support\nESM (EcmaScript Modules), the setup comes with individual build commands for\neach package and an overall build if needed, the individual builds are needed\nfor the `shared` and `components` packages to work with the web and core setup,\nsince you need to convert them into cjs before it can be used.\n\n### esm flavor\n\nThis is the preferred way of going ahead if you are building a new project and\nhave no dependencies on older node versions and can start with the latest LTS\nwhich supports modules. This is a pure module based approach and you don't need\nany additional build setup for the `shared` and `components` steps as they are\nall modules and will be imported as such in the `core` and `web` projects with\nthe exception of components since they need to be converted to JS from JSX\n\n### dev-modified\n\nThis is an optional version that I included since people might not want to move\nto a ESM setup but still want the `components` and `web` to work in sync with\neach other without having to rebuild the components every time you make a\nchange, or you could just leave it in watch mode `yarn shared:build --watch` but\nthis adds `react-app-rewired` to modify webpack to make sure it compiles the\ncomponents during both dev and building automatically.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbarelyhuman%2Fmono","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbarelyhuman%2Fmono","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbarelyhuman%2Fmono/lists"}