{"_id":"@cjser/gulp-plugin-extras__v0_2_2","name":"@cjser/gulp-plugin-extras__v0_2_2","dist-tags":{"latest":"0.2.2-cjser.2"},"versions":{"0.2.2-cjser.2":{"name":"@cjser/gulp-plugin-extras__v0_2_2","version":"0.2.2-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.2.2","cjserVersion":2,"original":{"name":"gulp-plugin-extras","version":"0.2.2","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.1"},"files":["index.js","index.d.ts","plugin-error.js"],"scripts":{"test":"xo && ava && tsc index.d.ts"}}},"_id":"@cjser/gulp-plugin-extras__v0_2_2@0.2.2-cjser.2","gitHead":"a4bef54d7d22d3d9a6b84528457938d84cd65fe7","_nodeVersion":"20.14.0","_npmVersion":"10.7.0","dist":{"integrity":"sha512-DUW2WjjpAC5ylU6H4593nYcXt6Guh4DA4vzyNCtObjzX4E0Q/MHk+GsivKhoEH60xFt1CHV6VMZ6vuANDrPdGg==","shasum":"4f00b50cf057eb145dd749620492c796498c2ced","tarball":"https://registry.npmjs.org/@cjser/gulp-plugin-extras__v0_2_2/-/gulp-plugin-extras__v0_2_2-0.2.2-cjser.2.tgz","fileCount":7,"unpackedSize":16002,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIARFn/dZ++7Poc4reiaj7Pk1UTtmP0JBAP4NuK+5aUEGAiBjuzB97dkyDte4uEbn1hpUboKOkV/Vr4/0iMLFwfgeTw=="}]},"_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_2_2_0.2.2-cjser.2_1778158418242_0.4378259841377885"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-07T12:53:38.152Z","0.2.2-cjser.2":"2026-05-07T12:53:38.380Z","modified":"2026-05-07T12:53:38.627Z"},"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, options?)`\n\nCreate a Gulp plugin.\n\nIf you throw an error with a `.isPresentable = true` property, it will not display the error stack.\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#### options\n\nType: `object`\n\n##### supportsDirectories\n\nType: `boolean`\\\nDefault: `false`\n\nWhether the plugin can handle directories.\n\n##### onFinish\n\nType: `async function * (stream: NodeJS.ReadableStream): 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\t{\n\t\t\tonFinish: async function * () {\n\t\t\t\tyield someVinylFile;\n\t\t\t\tyield someVinylFile2;\n\t\t\t}\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-6e8e9f8a10d9570bbb1881d3000cf873"}