{"_id":"gulp-chmod","_rev":"363976","name":"gulp-chmod","description":"Change permissions of Vinyl files","dist-tags":{"latest":"3.0.0"},"maintainers":[{"name":"sindresorhus","email":""}],"time":{"modified":"2021-07-15T09:50:19.000Z","created":"2014-03-07T11:23:44.488Z","3.0.0":"2019-05-28T15:26:58.410Z","2.0.0":"2016-11-08T18:12:38.237Z","1.3.0":"2015-10-16T08:06:02.975Z","1.2.0":"2014-10-22T22:57:06.501Z","1.1.1":"2014-09-02T17:58:23.033Z","1.1.0":"2014-08-07T10:38:07.295Z","1.0.0":"2014-07-26T00:38:27.277Z","0.2.2":"2014-07-26T00:37:49.729Z","0.2.1":"2014-06-10T14:55:41.154Z","0.2.0":"2014-03-07T22:58:17.834Z","0.1.0":"2014-03-07T11:23:44.488Z"},"users":{"iansinnott":true,"npmmax":true,"akodevs":true,"krocon":true,"thatk":true,"yikuo":true,"krugarmatt":true},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"repository":{"type":"git","url":"git+https://github.com/sindresorhus/gulp-chmod.git"},"versions":{"3.0.0":{"name":"gulp-chmod","version":"3.0.0","description":"Change permissions of Vinyl files","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/gulp-chmod.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=8"},"scripts":{"test":"xo && mocha"},"keywords":["gulpplugin","chmod","stat","file","vinyl","stream","permissions"],"dependencies":{"deep-assign":"^1.0.0","stat-mode":"^0.3.0","through2":"^3.0.1"},"devDependencies":{"mocha":"^6.1.4","vinyl":"^2.1.0","xo":"^0.24.0"},"gitHead":"d16cbcf8ab35629402ce4f0e8f95b984b1747e8c","bugs":{"url":"https://github.com/sindresorhus/gulp-chmod/issues"},"homepage":"https://github.com/sindresorhus/gulp-chmod#readme","_id":"gulp-chmod@3.0.0","_nodeVersion":"8.16.0","_npmVersion":"6.9.0","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"05d629451486ea1838c4bb681547e610fcfc127b","size":2529,"noattachment":false,"key":"/gulp-chmod/-/gulp-chmod-3.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/gulp-chmod/download/gulp-chmod-3.0.0.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/gulp-chmod_3.0.0_1559057218304_0.8364279844732847"},"_hasShrinkwrap":false,"publish_time":1559057218410,"_cnpm_publish_time":1559057218410},"2.0.0":{"name":"gulp-chmod","version":"2.0.0","description":"Change permissions of Vinyl files","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/gulp-chmod.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=4"},"scripts":{"test":"xo && mocha"},"files":["index.js"],"keywords":["gulpplugin","chmod","stat","file","vinyl","stream","permissions"],"dependencies":{"deep-assign":"^1.0.0","stat-mode":"^0.2.0","through2":"^2.0.0"},"devDependencies":{"mocha":"*","gulp-util":"^3.0.0","xo":"*"},"xo":{"esnext":true},"gitHead":"68412ff128a0f60c21883555e3b480849e35d4b8","bugs":{"url":"https://github.com/sindresorhus/gulp-chmod/issues"},"homepage":"https://github.com/sindresorhus/gulp-chmod#readme","_id":"gulp-chmod@2.0.0","_shasum":"00c390b928a0799b251accf631aa09e01cc6299c","_from":".","_npmVersion":"2.15.9","_nodeVersion":"4.6.1","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"00c390b928a0799b251accf631aa09e01cc6299c","size":2609,"noattachment":false,"key":"/gulp-chmod/-/gulp-chmod-2.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/gulp-chmod/download/gulp-chmod-2.0.0.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/gulp-chmod-2.0.0.tgz_1478628758002_0.030133006861433387"},"directories":{},"publish_time":1478628758237,"_cnpm_publish_time":1478628758237,"_hasShrinkwrap":false},"1.3.0":{"name":"gulp-chmod","version":"1.3.0","description":"Change permissions of Vinyl files","license":"MIT","repository":{"type":"git","url":"https://github.com/sindresorhus/gulp-chmod"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"http://sindresorhus.com"},"engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"files":["index.js"],"keywords":["gulpplugin","chmod","stat","file","vinyl","stream","permissions"],"dependencies":{"deep-assign":"^1.0.0","stat-mode":"^0.2.0","through2":"^2.0.0"},"devDependencies":{"mocha":"*","gulp-util":"^3.0.0"},"gitHead":"d1d7b7b422957c7b1533f71995a31c757d821755","bugs":{"url":"https://github.com/sindresorhus/gulp-chmod/issues"},"homepage":"https://github.com/sindresorhus/gulp-chmod","_id":"gulp-chmod@1.3.0","_shasum":"8bb6e8c11895dcbf9b42520c874347a5022bcb0d","_from":".","_npmVersion":"2.14.4","_nodeVersion":"4.1.1","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"8bb6e8c11895dcbf9b42520c874347a5022bcb0d","size":2396,"noattachment":false,"key":"/gulp-chmod/-/gulp-chmod-1.3.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/gulp-chmod/download/gulp-chmod-1.3.0.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"directories":{},"publish_time":1444982762975,"_cnpm_publish_time":1444982762975,"_hasShrinkwrap":false},"1.2.0":{"name":"gulp-chmod","version":"1.2.0","description":"Change permissions of Vinyl files","license":"MIT","repository":{"type":"git","url":"https://github.com/sindresorhus/gulp-chmod"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"http://sindresorhus.com"},"engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"files":["index.js"],"keywords":["gulpplugin","chmod","stat","file","vinyl","stream","permissions"],"dependencies":{"deep-extend":"^0.3.2","stat-mode":"^0.2.0","through2":"^0.6.1"},"devDependencies":{"mocha":"*","gulp-util":"^3.0.0"},"gitHead":"e8a7d3eba5d641e992a09df39558f6ec6bf0c316","bugs":{"url":"https://github.com/sindresorhus/gulp-chmod/issues"},"homepage":"https://github.com/sindresorhus/gulp-chmod","_id":"gulp-chmod@1.2.0","_shasum":"24bf04229898d26632ad70e74268c77a07b6b6e5","_from":".","_npmVersion":"2.1.4","_nodeVersion":"0.10.32","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"maintainers":[{"name":"sindresorhus","email":""}],"dist":{"shasum":"24bf04229898d26632ad70e74268c77a07b6b6e5","size":1666,"noattachment":false,"key":"/gulp-chmod/-/gulp-chmod-1.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/gulp-chmod/download/gulp-chmod-1.2.0.tgz"},"directories":{},"publish_time":1414018626501,"_cnpm_publish_time":1414018626501,"_hasShrinkwrap":false},"1.1.1":{"name":"gulp-chmod","version":"1.1.1","description":"Change permissions of Vinyl files","license":"MIT","repository":{"type":"git","url":"git://github.com/sindresorhus/gulp-chmod"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"http://sindresorhus.com"},"engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"files":["index.js"],"keywords":["gulpplugin","chmod","stat","file","vinyl","stream","permissions"],"dependencies":{"deep-extend":"^0.2.11","stat-mode":"^0.2.0","through2":"^0.6.1"},"devDependencies":{"mocha":"*","gulp-util":"^3.0.0"},"bugs":{"url":"https://github.com/sindresorhus/gulp-chmod/issues"},"homepage":"https://github.com/sindresorhus/gulp-chmod","_id":"gulp-chmod@1.1.1","_shasum":"70e7cd849b57216257cd86d5f2d91c2ad5356dc5","_from":".","_npmVersion":"1.4.9","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"maintainers":[{"name":"sindresorhus","email":""}],"dist":{"shasum":"70e7cd849b57216257cd86d5f2d91c2ad5356dc5","size":1661,"noattachment":false,"key":"/gulp-chmod/-/gulp-chmod-1.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/gulp-chmod/download/gulp-chmod-1.1.1.tgz"},"directories":{},"publish_time":1409680703033,"_cnpm_publish_time":1409680703033,"_hasShrinkwrap":false},"1.1.0":{"name":"gulp-chmod","version":"1.1.0","description":"Change permissions of Vinyl files","license":"MIT","repository":{"type":"git","url":"git://github.com/sindresorhus/gulp-chmod"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"http://sindresorhus.com"},"engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"files":["index.js"],"keywords":["gulpplugin","chmod","stat","file","vinyl","stream","permissions"],"dependencies":{"deep-extend":"^0.2.11","stat-mode":"^0.2.0","through2":"^0.5.1"},"devDependencies":{"mocha":"*","gulp-util":"^3.0.0"},"gitHead":"75e38265bb6cd965e68ca2a5fc277bfad68956b9","bugs":{"url":"https://github.com/sindresorhus/gulp-chmod/issues"},"homepage":"https://github.com/sindresorhus/gulp-chmod","_id":"gulp-chmod@1.1.0","_shasum":"8ad6f85013ac44e7ec84a4eae9609851f0e0b4f5","_from":".","_npmVersion":"1.4.14","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"maintainers":[{"name":"sindresorhus","email":""}],"dist":{"shasum":"8ad6f85013ac44e7ec84a4eae9609851f0e0b4f5","size":1689,"noattachment":false,"key":"/gulp-chmod/-/gulp-chmod-1.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/gulp-chmod/download/gulp-chmod-1.1.0.tgz"},"directories":{},"publish_time":1407407887295,"_cnpm_publish_time":1407407887295,"_hasShrinkwrap":false},"1.0.0":{"name":"gulp-chmod","version":"1.0.0","description":"Change permissions of Vinyl files","license":"MIT","repository":{"type":"git","url":"git://github.com/sindresorhus/gulp-chmod"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"http://sindresorhus.com"},"engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"files":["index.js"],"keywords":["gulpplugin","chmod","stat","file","vinyl","stream","permissions"],"dependencies":{"deep-extend":"^0.2.8","gulp-util":"^3.0.0","stat-mode":"^0.2.0","through2":"^0.5.1"},"devDependencies":{"mocha":"*"},"gitHead":"ef0450373173c19c8e362d26a6e2efcf40765f99","bugs":{"url":"https://github.com/sindresorhus/gulp-chmod/issues"},"homepage":"https://github.com/sindresorhus/gulp-chmod","_id":"gulp-chmod@1.0.0","_shasum":"6ff6f4ed879d43c6a0cbdc6f0fce470cf1a8bb70","_from":".","_npmVersion":"1.4.14","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"maintainers":[{"name":"sindresorhus","email":""}],"dist":{"shasum":"6ff6f4ed879d43c6a0cbdc6f0fce470cf1a8bb70","size":1738,"noattachment":false,"key":"/gulp-chmod/-/gulp-chmod-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/gulp-chmod/download/gulp-chmod-1.0.0.tgz"},"directories":{},"publish_time":1406335107277,"_cnpm_publish_time":1406335107277,"_hasShrinkwrap":false},"0.2.2":{"name":"gulp-chmod","version":"0.2.2","description":"Change permissions of Vinyl files","license":"MIT","repository":{"type":"git","url":"git://github.com/sindresorhus/gulp-chmod"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"http://sindresorhus.com"},"engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"files":["index.js"],"keywords":["gulpplugin","chmod","stat","file","vinyl","stream","permissions"],"dependencies":{"deep-extend":"^0.2.8","gulp-util":"^3.0.0","stat-mode":"^0.2.0","through2":"^0.5.1"},"devDependencies":{"mocha":"*"},"gitHead":"907a54becc803ed5c1893916a6973eb861015d61","bugs":{"url":"https://github.com/sindresorhus/gulp-chmod/issues"},"homepage":"https://github.com/sindresorhus/gulp-chmod","_id":"gulp-chmod@0.2.2","_shasum":"4bea524148c564f5330f0d9d4d884560e3e660de","_from":".","_npmVersion":"1.4.14","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"maintainers":[{"name":"sindresorhus","email":""}],"dist":{"shasum":"4bea524148c564f5330f0d9d4d884560e3e660de","size":1739,"noattachment":false,"key":"/gulp-chmod/-/gulp-chmod-0.2.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/gulp-chmod/download/gulp-chmod-0.2.2.tgz"},"directories":{},"publish_time":1406335069729,"_cnpm_publish_time":1406335069729,"_hasShrinkwrap":false},"0.2.1":{"name":"gulp-chmod","version":"0.2.1","description":"Change permissions of Vinyl files","license":"MIT","repository":{"type":"git","url":"git://github.com/sindresorhus/gulp-chmod"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"http://sindresorhus.com"},"engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"files":["index.js"],"keywords":["gulpplugin","chmod","stat","file","vinyl","stream","permissions"],"dependencies":{"deep-extend":"^0.2.8","gulp-util":"^2.2.12","stat-mode":"^0.2.0","through2":"^0.5.1"},"devDependencies":{"mocha":"*"},"bugs":{"url":"https://github.com/sindresorhus/gulp-chmod/issues"},"homepage":"https://github.com/sindresorhus/gulp-chmod","_id":"gulp-chmod@0.2.1","_shasum":"d1a10a37c2a5df5f1c17dd44cca811df4d2796c1","_from":".","_npmVersion":"1.4.9","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"maintainers":[{"name":"sindresorhus","email":""}],"dist":{"shasum":"d1a10a37c2a5df5f1c17dd44cca811df4d2796c1","size":1744,"noattachment":false,"key":"/gulp-chmod/-/gulp-chmod-0.2.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/gulp-chmod/download/gulp-chmod-0.2.1.tgz"},"directories":{},"publish_time":1402412141154,"_cnpm_publish_time":1402412141154,"_hasShrinkwrap":false},"0.2.0":{"name":"gulp-chmod","version":"0.2.0","description":"Change permissions of Vinyl files","license":"MIT","repository":{"type":"git","url":"git://github.com/sindresorhus/gulp-chmod"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"http://sindresorhus.com"},"engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"files":["index.js"],"keywords":["gulpplugin","chmod","stat","file","vinyl","stream","permissions"],"dependencies":{"gulp-util":"^2.2.12","through2":"^0.4.0","stat-mode":"^0.1.0","deep-extend":"^0.2.8"},"devDependencies":{"mocha":"*"},"bugs":{"url":"https://github.com/sindresorhus/gulp-chmod/issues"},"homepage":"https://github.com/sindresorhus/gulp-chmod","_id":"gulp-chmod@0.2.0","dist":{"shasum":"1413765bcd72de51c9b92296188a0b3c466281c6","size":1680,"noattachment":false,"key":"/gulp-chmod/-/gulp-chmod-0.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/gulp-chmod/download/gulp-chmod-0.2.0.tgz"},"_from":".","_npmVersion":"1.4.4","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"maintainers":[{"name":"sindresorhus","email":""}],"directories":{},"publish_time":1394233097834,"_cnpm_publish_time":1394233097834,"_hasShrinkwrap":false},"0.1.0":{"name":"gulp-chmod","version":"0.1.0","description":"Change permissions of Vinyl files","license":"MIT","repository":{"type":"git","url":"git://github.com/sindresorhus/gulp-chmod"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"http://sindresorhus.com"},"engines":{"node":">=0.10.0"},"scripts":{"test":"mocha"},"files":["index.js"],"keywords":["gulpplugin","chmod","stat","file","vinyl","stream","permissions"],"dependencies":{"gulp-util":"^2.2.12","through2":"^0.4.0","stat-mode":"^0.1.0","deep-extend":"^0.2.8"},"devDependencies":{"mocha":"*"},"bugs":{"url":"https://github.com/sindresorhus/gulp-chmod/issues"},"homepage":"https://github.com/sindresorhus/gulp-chmod","_id":"gulp-chmod@0.1.0","dist":{"shasum":"5ffe41f6d5089a19835f163e09aae213eda1ec43","size":1493,"noattachment":false,"key":"/gulp-chmod/-/gulp-chmod-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/gulp-chmod/download/gulp-chmod-0.1.0.tgz"},"_from":".","_npmVersion":"1.4.4","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"maintainers":[{"name":"sindresorhus","email":""}],"directories":{},"publish_time":1394191424488,"_cnpm_publish_time":1394191424488,"_hasShrinkwrap":false}},"readme":"# gulp-chmod [![Build Status](https://travis-ci.org/sindresorhus/gulp-chmod.svg?branch=master)](https://travis-ci.org/sindresorhus/gulp-chmod)\n\n> [Change permissions](https://en.wikipedia.org/wiki/Chmod) of [Vinyl](https://github.com/gulpjs/vinyl) files\n\n\n## Install\n\n```\n$ npm install --save-dev gulp-chmod\n```\n\n\n## Usage\n\n```js\nconst gulp = require('gulp');\nconst chmod = require('gulp-chmod');\n\ngulp.task('default', () =>\n\tgulp.src('src/app.js')\n\t\t.pipe(chmod(0o755))\n\t\t.pipe(gulp.dest('dist'))\n);\n```\n\nor\n\n```js\nconst gulp = require('gulp');\nconst chmod = require('gulp-chmod');\n\ngulp.task('default', () =>\n\tgulp.src('src/app.js')\n\t\t.pipe(chmod({\n\t\t\towner: {\n\t\t\t\tread: true,\n\t\t\t\twrite: true,\n\t\t\t\texecute: true\n\t\t\t},\n\t\t\tgroup: {\n\t\t\t\texecute: true\n\t\t\t},\n\t\t\tothers: {\n\t\t\t\texecute: true\n\t\t\t}\n\t\t}))\n\t\t.pipe(gulp.dest('dist'))\n);\n```\n\n\n## API\n\n### chmod(fileMode, [directoryMode])\n\n#### fileMode\n\nType: `number | object`\n\nCan either be a [chmod](http://ss64.com/bash/chmod.html) octal number or an object with the individual permissions specified.\n\nValues depends on the current file, but these are the possible keys:\n\n```js\n{\n\towner: {\n\t\tread: true,\n\t\twrite: true,\n\t\texecute: true\n\t},\n\tgroup: {\n\t\tread: true,\n\t\twrite: true,\n\t\texecute: true\n\t},\n\tothers: {\n\t\tread: true,\n\t\twrite: true,\n\t\texecute: true\n\t}\n}\n```\n\nWhen `read`, `write`, and `execute` are the same, you can simplify the object:\n\n```js\n{\n\tread: true\n}\n```\n\nPass `undefined` to not set permissions on files. Useful if you only want to set permissions on directories.\n\n#### directoryMode\n\nType: `true | number | object`\n\nSame as `fileMode`, but applies to directories.\n\nSpecify `true` to use the same value as `fileMode`.\n\n\n## Tip\n\nCombine it with [gulp-filter](https://github.com/sindresorhus/gulp-filter) to only change permissions on a subset of the files.\n\n```js\nconst gulp = require('gulp');\nconst gFilter = require('gulp-filter');\nconst chmod = require('gulp-chmod');\n\nconst filter = gFilter('src/cli.js', {restore: true});\n\ngulp.task('default', () =>\n\tgulp.src('src/*.js')\n\t\t// Filter a subset of the files\n\t\t.pipe(filter)\n\t\t// Make them executable\n\t\t.pipe(chmod(0o755))\n\t\t// Bring back the previously filtered out files\n\t\t.pipe(filter.restore)\n\t\t.pipe(gulp.dest('dist'))\n);\n```\n\n\n## Related\n\n- [gulp-chown](https://github.com/sindresorhus/gulp-chown) - Change owner of Vinyl files\n","_attachments":{},"homepage":"https://github.com/sindresorhus/gulp-chmod#readme","bugs":{"url":"https://github.com/sindresorhus/gulp-chmod/issues"},"license":"MIT"}