{"_id":"@cjser/gulp-plugin-extras__v0_3_0","name":"@cjser/gulp-plugin-extras__v0_3_0","dist-tags":{"latest":"0.3.0-cjser.2"},"versions":{"0.3.0-cjser.2":{"name":"@cjser/gulp-plugin-extras__v0_3_0","version":"0.3.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.3.0","cjserVersion":2,"original":{"name":"gulp-plugin-extras","version":"0.3.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.1"},"files":["index.js","index.d.ts","plugin-error.js"],"scripts":{"test":"xo && ava && tsc index.d.ts"}}},"_id":"@cjser/gulp-plugin-extras__v0_3_0@0.3.0-cjser.2","gitHead":"a4bef54d7d22d3d9a6b84528457938d84cd65fe7","_nodeVersion":"20.14.0","_npmVersion":"10.7.0","dist":{"integrity":"sha512-fzWfT7bC9GGydz+fHz8lolTCLfnLcdJopUO6/p7CsTGBNC4jFn8A61geA3FFLacO6HET8DNJFoPwzwggso1FmQ==","shasum":"747249b0bcac3bc2b2e9f9e72143eea2df2f14ad","tarball":"https://registry.npmjs.org/@cjser/gulp-plugin-extras__v0_3_0/-/gulp-plugin-extras__v0_3_0-0.3.0-cjser.2.tgz","fileCount":7,"unpackedSize":16744,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCICUYQbjXGebcOrrPg8wqLLmyfsxw9lDwxWIyzkBYK8nLAiBM6ehMaD04lxkfUjkvtmLBDDu5x4hTDENMnkUwsum4ag=="}]},"_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_3_0_0.3.0-cjser.2_1778158422059_0.2523215459436918"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-07T12:53:42.003Z","0.3.0-cjser.2":"2026-05-07T12:53:42.257Z","modified":"2026-05-07T12:53:42.421Z"},"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 unless you enable the `supportsAnyType` option.*\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##### supportsAnyType\n\nType: `boolean`\\\nDefault: `false`\n\nWhether the plugin can handle any Vinyl file type.\n\nUseful for custom type filtering.\n\nSupersedes `supportsDirectories`.\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\tasync * onFinish() {\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-939c73a5e75596658d03c198adc249d4"}