{"id":16095851,"url":"https://github.com/joakin/update-resourceloader-config-plugin","last_synced_at":"2026-04-30T10:05:48.813Z","repository":{"id":57387139,"uuid":"41301548","full_name":"joakin/update-resourceloader-config-plugin","owner":"joakin","description":"Update extension.json for mediawiki's resourceloader config with frontend modules for the webpack entry points.","archived":false,"fork":false,"pushed_at":"2015-08-24T20:18:36.000Z","size":124,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-12T04:20:59.161Z","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/joakin.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":"2015-08-24T12:24:05.000Z","updated_at":"2018-12-01T12:09:06.000Z","dependencies_parsed_at":"2022-09-15T03:11:30.268Z","dependency_job_id":null,"html_url":"https://github.com/joakin/update-resourceloader-config-plugin","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/joakin%2Fupdate-resourceloader-config-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joakin%2Fupdate-resourceloader-config-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joakin%2Fupdate-resourceloader-config-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joakin%2Fupdate-resourceloader-config-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/joakin","download_url":"https://codeload.github.com/joakin/update-resourceloader-config-plugin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247393573,"owners_count":20931813,"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-09T17:09:14.018Z","updated_at":"2026-04-30T10:05:43.792Z","avatar_url":"https://github.com/joakin.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"UpdateResourceLoaderConfigPlugin\n================================\n\nWebpack plugin for automatically adding ResourceLoader frontend modules to\na `extension.json`. It'll extract i18n labels and required mobileFrontend\nmodules with `mw.mobileFrontend.require`.\n\n```\nnpm install --save-dev update-resourceloader-config-plugin\n```\n\nThen on your `webpack.config.js` add it to the plugins:\n\n```js\nvar conf = {\n\tentry: {\n\t\t'resources/ext.gather.special.collection/init': './resources/ext.gather.special.collection/init.js'\n\t},\n\toutput: {\n\t\tpath: path.join(__dirname, 'build'),\n\t\tfilename: '[name].js'\n\t},\n\tmodule: {\n\t\tloaders: [\n\t\t\t// ...\n\t\t]\n\t},\n\tplugins: [\n\t\tnew UpdateResourceLoaderConfig({\n\t\t\ti18n: 'mw.msg'\n\t\t})\n\t]\n};\n```\n\nIn this case it will create an entry\n`resources/ext.gather.special.collection/init` in `extension.json` containing\nthe entry script, the i18n labels and the dependent modules required found.\nLike this:\n\n```json\n{\n  \"//\": \"...\",\n  \"ResourceModules\": {\n    \"resources/ext.gather.special.collection/init.js\": {\n      \"targets\": [\n\t\"mobile\",\n      \"desktop\"\n      ],\n      \"group\": \"other\",\n      \"dependencies\": [\n\t\"ext.gather.api/CollectionsApi\",\n      \"Button\",\n      \"Icon\",\n      \"ext.gather.collection.confirm/ConfirmationOverlay\",\n      \"ext.gather.logging/SchemaGatherFlags\",\n      \"toast\"\n      ],\n      \"scripts\": [\n\t\"build/resources/ext.gather.special.collection/init.js\"\n      ]\n    }\n  }\n}\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoakin%2Fupdate-resourceloader-config-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoakin%2Fupdate-resourceloader-config-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoakin%2Fupdate-resourceloader-config-plugin/lists"}