{"_id":"@cjser/gulp-plugin-extras__v0_1_0","name":"@cjser/gulp-plugin-extras__v0_1_0","dist-tags":{"latest":"0.1.0-cjser.2"},"versions":{"0.1.0-cjser.2":{"name":"@cjser/gulp-plugin-extras__v0_1_0","version":"0.1.0-cjser.2","description":"Useful utilities for creating Gulp plugins","license":"MIT","repository":{"type":"git","url":"https://code.moenext.com/3rdeye/cjser.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":{"types":"./index.d.ts","require":"./dist-cjser/index.cjs","default":"./index.js"},"engines":{"node":">=18"},"scripts":{"test":"xo && ava && tsc index.d.ts"},"keywords":["gulp","plugin","extras","utilities"],"dependencies":{"@types/vinyl":"^2.0.9","@cjser/chalk":"5.6.2-cjser.2","@cjser/easy-transform-stream":"1.0.1-cjser.2"},"devDependencies":{"ava":"^5.3.1","p-event":"^6.0.0","typescript":"^5.2.2","vinyl":"^3.0.0","xo":"^0.56.0"},"xo":{"rules":{"@typescript-eslint/no-require-imports":"off"}},"types":"./index.d.ts","main":"./dist-cjser/index.cjs","cjser":{"sourceVersion":"0.1.0","cjserVersion":2,"original":{"name":"gulp-plugin-extras","version":"0.1.0","exports":{"types":"./index.d.ts","default":"./index.js"},"repository":"sindresorhus/gulp-plugin-extras","dependencies":{"@types/vinyl":"^2.0.9","chalk":"^5.3.0","easy-transform-stream":"^1.0.0"},"files":["index.js","index.d.ts","plugin-error.js"],"scripts":{"test":"xo && ava && tsc index.d.ts"}}},"_id":"@cjser/gulp-plugin-extras__v0_1_0@0.1.0-cjser.2","gitHead":"a4bef54d7d22d3d9a6b84528457938d84cd65fe7","_nodeVersion":"20.14.0","_npmVersion":"10.7.0","dist":{"integrity":"sha512-Z9QJNPElhyMH6IBwAA8xXHBfQ3swBTlfkUT43xxRKjbBejqc12fmHOu9s0h38gFPjlfYhB4dTsNVyaCob10tew==","shasum":"b6c12ae8f231c2a334e55074b7f3cc902db250f1","tarball":"https://registry.npmjs.org/@cjser/gulp-plugin-extras__v0_1_0/-/gulp-plugin-extras__v0_1_0-0.1.0-cjser.2.tgz","fileCount":7,"unpackedSize":14911,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDKsUCjWF9Ji9ci+iQ50tiQ7TTKxfTsDLtCYpSL7Ne5dQIgMYiXIu2jLorWKcjCjlBOCTNRM5Dl3oRWC67vWluwtQ4="}]},"_npmUser":{"name":"nanahira","email":"nanahira@momobako.com"},"directories":{},"maintainers":[{"name":"nanahira","email":"nanahira@momobako.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/gulp-plugin-extras__v0_1_0_0.1.0-cjser.2_1778158414205_0.2460695744381709"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-07T12:53:34.091Z","0.1.0-cjser.2":"2026-05-07T12:53:34.339Z","modified":"2026-05-07T12:53:34.587Z"},"maintainers":[{"name":"nanahira","email":"nanahira@momobako.com"}],"description":"Useful utilities for creating Gulp plugins","keywords":["gulp","plugin","extras","utilities"],"repository":{"type":"git","url":"https://code.moenext.com/3rdeye/cjser.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"license":"MIT","readme":"# gulp-plugin-extras\n\n> Useful utilities for creating [Gulp](https://github.com/gulpjs/gulp) plugins\n\n## Install\n\n```sh\nnpm install gulp-plugin-extras\n```\n\n## Usage\n\n```js\nimport {gulpPlugin} from 'gulp-plugin-extras';\n\nexport default function gulpFoo() {\n\treturn gulpPlugin('gulp-foo', async file => {\n\t\tfile.contents = await someKindOfTransformation(file.contents);\n\t\treturn file;\n\t});\n}\n```\n\n## API\n\n### `gulpPlugin(name, onFile, onFinish?)`\n\nCreate a Gulp plugin.\n\n*This does not support streaming.*\n\n#### name\n\nType: `string`\n\nThe plugin name.\n\n#### onFile\n\nType: `async (file) => file`\n\nThe async function called for each [Vinyl file](https://github.com/gulpjs/vinyl) in the stream. Must return a modified or new Vinyl file.\n\n#### onFinish\n\nType: `async function * (): void`\n\nAn async generator function executed for finalization after all files have been processed.\n\nYou can yield more files from it if needed.\n\n```js\nimport {gulpPlugin} from 'gulp-plugin-extras';\n\nexport default function gulpFoo() {\n\treturn gulpPlugin(\n\t\t'gulp-foo',\n\t\tasync file => { … },\n\t\tasync function * () {\n\t\t\tyield someVinylFile;\n\t\t\tyield someVinylFile2;\n\t\t}\n\t);\n}\n```\n\n## cjser\n\nThis package is a CommonJS-compatible build generated by cjser for projects that still need `require()` support. The source version matches the original npm package version, with a cjser prerelease suffix for this generated build.\nOriginal repository: https://github.com/sindresorhus/gulp-plugin-extras\n","readmeFilename":"readme.md","_rev":"1-7de4816c09c9a9e557558922da4107eb"}