{"_id":"gulp-cond","_rev":"13-e96a67fcd54d856910a8cda818360667","name":"gulp-cond","dist-tags":{"latest":"2.0.0"},"versions":{"0.0.1":{"name":"gulp-cond","version":"0.0.1","keywords":["gulpplugin","gulp","gulp-plugin","font","svg","ttf","converter"],"author":{"url":"http://www.insertafter.com/blog.html","name":"Nicolas Froidure"},"_id":"gulp-cond@0.0.1","maintainers":[{"name":"nfroidure","email":"nfroidure@elitwork.com"}],"homepage":"https://github.com/nfroidure/gulp-cond","bugs":{"url":"https://github.com/nfroidure/gulp-cond/issues"},"dist":{"shasum":"1ce4a4f1a9dd64cecef990083a5e5728b2b855b0","tarball":"https://registry.npmjs.org/gulp-cond/-/gulp-cond-0.0.1.tgz","integrity":"sha512-YiHEsaZu/uS+VDnZwjOpMUBRKp4S6i3+KMd6earAxLM4XzbvJeObWj+YB/01EkKVS94IhWrb3mQTA00bkVauAQ==","signatures":[{"sig":"MEUCICzBzil3Q3nXPckA2McTzRrKlTjgwi2Mz9cErvoQI3eTAiEA/CmHBG817v3fZtcbS5NNOEv3K9YQesqvEuI2a35BdwE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"src/index.js","_from":".","engines":{"node":">= 0.10.0"},"scripts":{"test":"mocha tests/*.mocha.js"},"_npmUser":{"name":"nfroidure","email":"nfroidure@elitwork.com"},"licenses":[{"url":"https://github.com/nfroidure/gulp-cond/blob/master/LICENSE","type":"MIT"}],"repository":{"url":"git://github.com/nfroidure/gulp-cond.git","type":"git"},"_npmVersion":"1.3.14","description":"Ternary operator for Gulp.","devDependencies":{"mocha":"~1.16.2","gulp-util":"~2.2.14","event-stream":"~3.0.20"},"directories":{}},"0.0.2":{"name":"gulp-cond","version":"0.0.2","keywords":["gulpplugin","gulp","gulp-plugin","condition","operator","ternary"],"author":{"url":"http://www.insertafter.com/blog.html","name":"Nicolas Froidure"},"_id":"gulp-cond@0.0.2","maintainers":[{"name":"nfroidure","email":"nfroidure@elitwork.com"}],"homepage":"https://github.com/nfroidure/gulp-cond","bugs":{"url":"https://github.com/nfroidure/gulp-cond/issues"},"dist":{"shasum":"8fc6d7d8fc45ab4e5a55cae1d4a43b8226d1f9b6","tarball":"https://registry.npmjs.org/gulp-cond/-/gulp-cond-0.0.2.tgz","integrity":"sha512-8wnKhkOt9FUJH+FTDwVV81xAopI+TVHjZRd4of9ZCkIZfkwYFL33xkVle0LWUY6GcdYy+47D8gh0waicS8TRsA==","signatures":[{"sig":"MEYCIQCvCYzUFmKyHfeCuvzlar1J4Toe/HMcBoz6M4kA+WxSQwIhAIbAxo40wjpRRZoIoiwvRgVmNjzE5elp0yj/Q+Csa31g","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"src/index.js","_from":".","engines":{"node":">= 0.10.0"},"scripts":{"test":"node_modules/mocha/bin/mocha tests/*.mocha.js","cover":"./node_modules/istanbul/lib/cli.js cover --report html ./node_modules/mocha/bin/_mocha -- tests/*.mocha.js -R spec -t 5000","coveralls":"./node_modules/istanbul/lib/cli.js cover ./node_modules/mocha/bin/_mocha --report lcovonly -- tests/*.mocha.js -R spec -t 5000 && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js && rm -rf ./coverage"},"_npmUser":{"name":"nfroidure","email":"nfroidure@elitwork.com"},"licenses":[{"url":"https://github.com/nfroidure/gulp-cond/blob/master/LICENSE","type":"MIT"}],"repository":{"url":"git://github.com/nfroidure/gulp-cond.git","type":"git"},"_npmVersion":"1.4.3","description":"Ternary operator for Gulp.","dependencies":{"readable-stream":"^1.0.26-2"},"devDependencies":{"mocha":"~1.18.2","istanbul":"~0.2.6","coveralls":"~2.10.0","gulp-util":"~2.2.14","event-stream":"~3.1.1","mocha-lcov-reporter":"0.0.1"},"directories":{}},"1.0.0":{"name":"gulp-cond","version":"1.0.0","keywords":["gulpplugin","gulp","gulp-plugin","condition","operator","ternary"],"author":{"url":"http://www.insertafter.com/blog.html","name":"Nicolas Froidure"},"_id":"gulp-cond@1.0.0","maintainers":[{"name":"nfroidure","email":"nfroidure@elitwork.com"}],"homepage":"https://github.com/nfroidure/gulp-cond","bugs":{"url":"https://github.com/nfroidure/gulp-cond/issues"},"dist":{"shasum":"9980c3cdcafa9bc4cd30ab871087ac135955b558","tarball":"https://registry.npmjs.org/gulp-cond/-/gulp-cond-1.0.0.tgz","integrity":"sha512-zbaT+rxrjioXFZSPPSv0YPS/bqYzYUALa+K+hP0qSUYGVEotGtmvwtFUAM6t5KjS+iWytOR/WuWzR+ktFCrbJQ==","signatures":[{"sig":"MEYCIQDqSS4Wr904Y0fFG5njRXtLXfd4w/Q4KvhRnJwjCu/wpAIhAI0QP7QdTN/cKLTWdkzbnEwVUyM18DMDxn39R7ighsOj","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"src/index.js","_from":".","_shasum":"9980c3cdcafa9bc4cd30ab871087ac135955b558","engines":{"node":">= 0.10.0"},"gitHead":"a6094f46a7cdb20afe51dc5299d3519e3d8bc1fe","scripts":{"test":"mocha tests/*.mocha.js","cover":"./node_modules/istanbul/lib/cli.js cover --report html ./node_modules/mocha/bin/_mocha -- tests/*.mocha.js -R spec -t 5000","coveralls":"./node_modules/istanbul/lib/cli.js cover ./node_modules/mocha/bin/_mocha --report lcovonly -- tests/*.mocha.js -R spec -t 5000 && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js && rm -rf ./coverage"},"_npmUser":{"name":"nfroidure","email":"nfroidure@elitwork.com"},"licenses":[{"url":"https://github.com/nfroidure/gulp-cond/blob/master/LICENSE","type":"MIT"}],"repository":{"url":"git://github.com/nfroidure/gulp-cond.git","type":"git"},"_npmVersion":"2.5.1","description":"Ternary operator for Gulp.","_nodeVersion":"0.12.0","dependencies":{"readable-stream":"^2.0.1"},"devDependencies":{"mocha":"^2.2.5","vinyl":"^0.5.0","istanbul":"^0.3.16","coveralls":"^2.11.2","streamtest":"^1.2.1","mocha-lcov-reporter":"0.0.2"},"directories":{}},"2.0.0":{"metapak":{"data":{"files":"src/*.ts","testFiles":"tests/*.test.ts","bundleFiles":["dist","src","bin"],"ignore":["dist"]},"configs":["main","readme","jest","eslint","tsesm","codeclimate","ghactions"]},"name":"gulp-cond","description":"Ternary operator for Gulp.","version":"2.0.0","homepage":"https://github.com/nfroidure/gulp-cond","author":{"name":"Nicolas Froidure","email":"nicolas.froidure@insertafter.com","url":"https://insertafter.com/en/index.html"},"repository":{"type":"git","url":"git://github.com/nfroidure/gulp-cond.git"},"bugs":{"url":"https://github.com/nfroidure/gulp-cond/issues"},"licenses":[{"type":"MIT","url":"https://github.com/nfroidure/gulp-cond/blob/master/LICENSE"}],"main":"dist/index.js","engines":{"node":">=20.11.1"},"scripts":{"build":"rimraf 'dist' && tsc --outDir dist","changelog":"conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md","cli":"env NODE_ENV=${NODE_ENV:-cli}","cover":"npm run jest -- --coverage","cz":"env NODE_ENV=${NODE_ENV:-cli} git cz","format":"npm run prettier","jest":"NODE_OPTIONS=--experimental-vm-modules NODE_ENV=test jest","lint":"eslint src/*.ts","metapak":"metapak","precz":"npm run build && npm t && npm run lint && npm run metapak -- -s","prettier":"prettier --write src/*.ts","preversion":"npm run build && npm t && npm run lint && npm run metapak -- -s","rebuild":"swc ./src -s -d dist -C jsc.target=es2022","test":"npm run jest","type-check":"tsc --pretty --noEmit","version":"npm run changelog"},"keywords":["gulpplugin","gulp","gulp-plugin","condition","operator","ternary"],"devDependencies":{"@eslint/js":"^9.7.0","@swc/cli":"^0.4.0","@swc/core":"^1.6.13","@swc/helpers":"^0.5.12","@swc/jest":"^0.2.36","@types/vinyl":"^2.0.12","commitizen":"^4.3.0","conventional-changelog-cli":"^5.0.0","cz-conventional-changelog":"^3.3.0","eslint":"^9.7.0","eslint-config-prettier":"^9.1.0","eslint-plugin-jest":"^28.6.0","eslint-plugin-prettier":"^5.1.3","jest":"^29.7.0","metapak":"^6.0.1","metapak-nfroidure":"18.2.0","prettier":"^3.3.3","rimraf":"^6.0.1","streamtest":"^3.0.1","typescript":"^5.5.3","typescript-eslint":"^7.16.0","vinyl":"^3.0.0"},"contributors":[],"license":"MIT","config":{"commitizen":{"path":"./node_modules/cz-conventional-changelog"}},"greenkeeper":{"ignore":["commitizen","cz-conventional-changelog","conventional-changelog-cli","jest","@swc/jest","eslint","prettier","eslint-config-prettier","eslint-plugin-prettier","typescript-eslint","typescript","rimraf","@swc/cli","@swc/core","@swc/helpers"]},"jest":{"coverageReporters":["lcov"],"testPathIgnorePatterns":["/node_modules/"],"roots":["<rootDir>/src"],"transform":{"^.+\\.tsx?$":["@swc/jest",{}]},"testEnvironment":"node","moduleNameMapper":{"(.+)\\.js":"$1"},"extensionsToTreatAsEsm":[".ts"],"prettierPath":null},"overrides":{"eslint":"^9.7.0"},"prettier":{"semi":true,"printWidth":80,"singleQuote":true,"trailingComma":"all","proseWrap":"always"},"type":"module","types":"dist/index.d.ts","_id":"gulp-cond@2.0.0","gitHead":"6afeb2b3f0fbe60b6badf3e73fbc0e89b0be76e9","_nodeVersion":"20.14.0","_npmVersion":"10.7.0","dist":{"integrity":"sha512-nKfxMwoQ2ZKKYHZAeocEp/0xuEADc5/HY2JmYpMl24pANUQjPiqUmFJb/9CLmseonIr2K20PXkKx/yvIvb2j1Q==","shasum":"8d09ea7a7ff98e836edd9920259b8ba29311a2b3","tarball":"https://registry.npmjs.org/gulp-cond/-/gulp-cond-2.0.0.tgz","fileCount":12,"unpackedSize":33848,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDAyaIH5aJHaGPiKnPqyIHEx0sTX4Kicv1bazU8MlEpdgIhAJBQP+AVoOBwebKaxG+FrGbryJIAOqdWXIId20WBssW0"}]},"_npmUser":{"name":"nfroidure","email":"nicolas.froidure@insertafter.com"},"directories":{},"maintainers":[{"name":"nfroidure","email":"nicolas.froidure@insertafter.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/gulp-cond_2.0.0_1723397966450_0.259413956824061"},"_hasShrinkwrap":false}},"time":{"created":"2014-02-09T01:15:10.334Z","modified":"2024-08-11T17:39:26.797Z","0.0.1":"2014-02-09T01:15:12.192Z","0.0.2":"2014-03-29T09:12:18.071Z","1.0.0":"2015-07-05T08:03:24.959Z","2.0.0":"2024-08-11T17:39:26.621Z"},"bugs":{"url":"https://github.com/nfroidure/gulp-cond/issues"},"author":{"name":"Nicolas Froidure","email":"nicolas.froidure@insertafter.com","url":"https://insertafter.com/en/index.html"},"homepage":"https://github.com/nfroidure/gulp-cond","keywords":["gulpplugin","gulp","gulp-plugin","condition","operator","ternary"],"repository":{"type":"git","url":"git://github.com/nfroidure/gulp-cond.git"},"description":"Ternary operator for Gulp.","maintainers":[{"name":"nfroidure","email":"nicolas.froidure@insertafter.com"}],"readme":"[//]: # ( )\n[//]: # (This file is automatically generated by a `metapak`)\n[//]: # (module. Do not change it  except between the)\n[//]: # (`content:start/end` flags, your changes would)\n[//]: # (be overridden.)\n[//]: # ( )\n# gulp-cond\n> Ternary operator for Gulp.\n\n[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/nfroidure/gulp-cond/blob/main/LICENSE)\n\n\n[//]: # (::contents:start)\n\n## Usage\n\nFirst, install `gulp-cond` as a development dependency:\n\n```shell\nnpm install --save-dev gulp-cond\n```\n\nThen, use it to conditionally pipe plugins in your `gulpfile.js`:\n\n```js\nimport cond from 'gulp-cond';\nvar prod = gulp.env.prod;\n\n// Images\ngulp.task('build_images', function() {\n  gulp.src('assets/images/**/*.svg')\n    .pipe(cond(prod,\n      gSvgmin(options), // minify SVG images under production\n      gWatch().pipe(gLivereload(server))) // use live reload in dev mode\n    )\n    .pipe(gulp.dest('www/images'))\n});\n```\n\nAlternatively, you can provide plugin functions instead of streams to\n  instantiate streams only when needed :\n\n```js\nimport cond from 'gulp-cond';\nvar prod = gulp.env.prod;\n\n// Images\ngulp.task('build_images', function() {\n  gulp.src('assets/images/**/*.svg')\n    .pipe(cond(prod,\n      gSvgmin.bind(null, options), // minify SVG images under production\n      function () { // use live reload in dev mode\n        return gWatch().pipe(gLivereload(server));\n      })\n    )\n    .pipe(gulp.dest('www/images'))\n});\n```\n\n## API\n\n### cond(condition, expr1, expr2)\n\n#### condition\nType: `Boolean` or `Function`\n\nRequired. A value or a function providing a value. If the value is truthy, expr1\n will be used, else, expr2 will be use if provided.\n\n#### expr1\nType: `Stream` or `Function`\n\nRequired. A stream or a function providing a stream.\n\n#### expr2\nType: `Stream` or `Function`\nDefault value: `Stream.PassThrough`\n\nA stream or a function providing a stream.\n\n### Contributing / Issues\n\nYou may want to contribute to this project, pull requests are welcome if you\n accept to publish under the MIT license.\n\n\n\n[//]: # (::contents:end)\n\n# Authors\n- [Nicolas Froidure](https://insertafter.com/en/index.html)\n\n# License\n[MIT](https://github.com/nfroidure/gulp-cond/blob/main/LICENSE)\n","readmeFilename":"README.md","users":{"kiinlam":true},"contributors":[],"license":"MIT"}