{"id":17956848,"url":"https://github.com/gekorm/webpack-permissions-plugin","last_synced_at":"2025-08-21T03:14:29.244Z","repository":{"id":21857832,"uuid":"93740353","full_name":"GeKorm/webpack-permissions-plugin","owner":"GeKorm","description":"A webpack plugin to manage the permissions of output files and directories","archived":false,"fork":false,"pushed_at":"2024-07-08T17:06:47.000Z","size":49,"stargazers_count":11,"open_issues_count":0,"forks_count":8,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-22T12:12:13.788Z","etag":null,"topics":["permissions","webpack","webpack-plugin"],"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/GeKorm.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"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}},"created_at":"2017-06-08T11:10:07.000Z","updated_at":"2024-07-08T17:06:50.000Z","dependencies_parsed_at":"2024-10-29T11:13:32.093Z","dependency_job_id":null,"html_url":"https://github.com/GeKorm/webpack-permissions-plugin","commit_stats":{"total_commits":28,"total_committers":8,"mean_commits":3.5,"dds":0.3928571428571429,"last_synced_commit":"fbf2c7d08e0e71db2fc3d64e52af5cb20e791b4c"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GeKorm%2Fwebpack-permissions-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GeKorm%2Fwebpack-permissions-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GeKorm%2Fwebpack-permissions-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GeKorm%2Fwebpack-permissions-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GeKorm","download_url":"https://codeload.github.com/GeKorm/webpack-permissions-plugin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250237832,"owners_count":21397401,"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":["permissions","webpack","webpack-plugin"],"created_at":"2024-10-29T10:43:19.492Z","updated_at":"2025-04-22T12:12:18.656Z","avatar_url":"https://github.com/GeKorm.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Webpack Permissions Plugin\n\nA webpack plugin to manage the permissions of output files and directories  \nTested with **Webpack 2, 3 and 4**\n\n### Install\n\n- Yarn: `yarn add -D webpack-permissions-plugin`\n- Npm: `npm i -D webpack-permissions-plugin`\n\n### Usage\n\n**buildFolders** (_String: path_) The directories to chmod recursively  \n**buildFiles** (_String: path_) The specific files to chmod\n\nFiles under _buildFolders_ get file-specific permissions.\n\n###### Simple: Directories 644, Files 755\n\n```javascript\nconst PermissionsOutputPlugin = require('webpack-permissions-plugin');\n\nplugins.push(\n  new PermissionsOutputPlugin({\n    buildFolders: [\n      path.resolve(__dirname, 'resources/'),\n      path.resolve(__dirname, 'dist/')\n    ],\n    buildFiles: [\n      path.resolve(__dirname, 'someFile.js'),\n      path.resolve(__dirname, 'dist/app.js')\n    ]\n    // dist/app.js is redundant, it already got 755 by being included in the buildFolder above\n  })\n);\n```\n\n###### Advanced: Per-path modes\n\nMode: an octal string or octal integer (eg. `755` or `0o755`)\n\n```javascript\nconst PermissionsOutputPlugin = require('webpack-permissions-plugin');\n\nplugins.push(\n  new PermissionsOutputPlugin({\n    buildFolders: [\n      {\n        path: path.resolve(__dirname, 'resources/'), // Everything under resources/ gets these modes\n        fileMode: '755',\n        dirMode: '644'\n      },\n      {\n        path: path.resolve(__dirname, 'dist/'), // Everything under dist/ gets these modes\n        fileMode: '755',\n        dirMode: '644'\n      }\n    ],\n    buildFiles: [\n      {\n        path: path.resolve(__dirname, 'someFile.js'),\n        fileMode: '755'\n      },\n      {\n        path: path.resolve(__dirname, 'dist/app.js'),\n        fileMode: '777' // Overrides previous dist/ mode\n      }\n    ]\n  })\n);\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgekorm%2Fwebpack-permissions-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgekorm%2Fwebpack-permissions-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgekorm%2Fwebpack-permissions-plugin/lists"}