{"id":22703914,"url":"https://github.com/2do2go/requirejs-common-wrap-middleware","last_synced_at":"2025-04-13T09:44:27.730Z","repository":{"id":57354382,"uuid":"9495072","full_name":"2do2go/requirejs-common-wrap-middleware","owner":"2do2go","description":null,"archived":false,"fork":false,"pushed_at":"2016-04-14T18:55:09.000Z","size":8,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-27T01:11:43.011Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/2do2go.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":"2013-04-17T10:28:44.000Z","updated_at":"2016-04-14T18:50:47.000Z","dependencies_parsed_at":"2022-09-12T06:00:33.452Z","dependency_job_id":null,"html_url":"https://github.com/2do2go/requirejs-common-wrap-middleware","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/2do2go%2Frequirejs-common-wrap-middleware","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/2do2go%2Frequirejs-common-wrap-middleware/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/2do2go%2Frequirejs-common-wrap-middleware/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/2do2go%2Frequirejs-common-wrap-middleware/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/2do2go","download_url":"https://codeload.github.com/2do2go/requirejs-common-wrap-middleware/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248694162,"owners_count":21146944,"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-12-10T08:13:08.343Z","updated_at":"2025-04-13T09:44:27.704Z","avatar_url":"https://github.com/2do2go.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# RequireJS commonJS wrap middleware\n\nEasiest way to share your modules between server and client side\n\n\n## Usage\n\nSample config\n\n```js\nvar config = {\n  \tbaseUrl: '/js/',\n\tbasePath: 'static/js/',\n\tmodules: {\n\t\t'your/module/url': {\n\t\t\tpath: 'path/to/module'\n\t\t},\n\t\t// example with dependencies mapping\n\t\t'your/another/module/url': {\n\t\t\tpath: 'path/to/another/module',\n\t\t\tdependenciesMap: {\n\t\t\t\t'original/dependency/path': 'new/dependency/url'\n\t\t\t}\n\t\t}\n\t}\n};\n```\n\nAs a middleware\n\n```js\nvar app = express.createServer();\napp.use(require('requirejs-common-wrap-middleware').wrapper(config));\n```\n\nfor production at a build script:\n\n```js\nrequire('requirejs-common-wrap-middleware').builder(config);\n```\n\nYou can use the same config for wrapper and builder, but\nwrapper does not use `basePath` option, in opposite, builder does not use\n`baseUrl` option, but use basePath.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F2do2go%2Frequirejs-common-wrap-middleware","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F2do2go%2Frequirejs-common-wrap-middleware","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F2do2go%2Frequirejs-common-wrap-middleware/lists"}