{"id":18657887,"url":"https://github.com/lightsofapollo/npm_monolithic","last_synced_at":"2025-11-05T22:30:23.052Z","repository":{"id":23055706,"uuid":"26408985","full_name":"lightsofapollo/npm_monolithic","owner":"lightsofapollo","description":"Example of monolithic project with multiple packages in a single repository ","archived":false,"fork":false,"pushed_at":"2014-11-09T23:15:37.000Z","size":144,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2024-12-27T15:12:42.654Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","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/lightsofapollo.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}},"created_at":"2014-11-09T20:59:45.000Z","updated_at":"2014-11-09T23:14:59.000Z","dependencies_parsed_at":"2022-08-19T16:50:30.209Z","dependency_job_id":null,"html_url":"https://github.com/lightsofapollo/npm_monolithic","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lightsofapollo%2Fnpm_monolithic","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lightsofapollo%2Fnpm_monolithic/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lightsofapollo%2Fnpm_monolithic/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lightsofapollo%2Fnpm_monolithic/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lightsofapollo","download_url":"https://codeload.github.com/lightsofapollo/npm_monolithic/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239475960,"owners_count":19645041,"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-11-07T07:30:17.335Z","updated_at":"2025-11-05T22:30:23.011Z","avatar_url":"https://github.com/lightsofapollo.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# npm_monolithic\n\nExample of monolithic project with multiple packages in a single repository.\n\n## How it works\n\nThis works via a small set of hacks and npm configuration tricks:\n\n  - set the \"prefix\" for local package installs to this project.\n\n  - the `link` configuration in npm must be true this will symlink packages\n    from the globally (global is now in the folder so this works)\n    installed packages.\n\n  - currently running npm install from the root package does not seem to\n    use linking functionality (this could be a bug?) so we have a\n    linkify.sh preinstall hook which runs npm install / link manually in\n    each sub project to ensure dependencies are installed and linked.\n\n  - in the \"root\" (never to be published) package use file: dependencies\n    so npm / node commands work as usual.\n\n## How to cache it?\n\nRunning a local registry is not a terrible option but is not the only\noption for simple cases you can hash the contents of package.json and\nstore the node_modules folder as a tar.gz somewhere. This project\nbreaks those basic assumptions but this still can work via:\n\n  - read package.json\n  - hash each package.json in the sub packages\n  - hash looks like:\n\n    - md5 package.json\n    - md5 sub1/package.json\n    - md5 sub2/package.json\n\n  - upload globally installed packages (the sum of all sub dependencies)\n\nWhen downloading the cache running |npm install| again will work by\nsetting up the symlinks in the sub projects again.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flightsofapollo%2Fnpm_monolithic","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flightsofapollo%2Fnpm_monolithic","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flightsofapollo%2Fnpm_monolithic/lists"}