{"_id":"gulp-dependents","_rev":"11-6e3bc20ee010e0da0de70fde9b3e93d3","name":"gulp-dependents","description":"Gulp plugin that tracks dependencies between files and adds any files that depend on the files currently in the stream, thus enabling incremental build of pcss, less, scss, sass, with extensibility points to support other file types.","dist-tags":{"latest":"1.2.5"},"versions":{"1.0.0":{"name":"gulp-dependents","version":"1.0.0","description":"Gulp plugin that tracks dependencies between files and adds any files that depend on the files currently in the stream, thus enabling incremental build of less, scss, sass, with extensibility points to support other file types.","keywords":["gulp","incremental","dependencies","dependents","dependent","include","import","compile","build","less","sass","scss"],"license":"MIT","author":{"name":"Thomas Darling","email":"mail@thda.dk"},"homepage":"https://github.com/thomas-darling/gulp-dependents","bugs":{"url":"https://github.com/thomas-darling/gulp-dependents/issues"},"repository":{"type":"git","url":"git+https://github.com/thomas-darling/gulp-dependents.git"},"dependencies":{"gulp-util":"^3.0.7","through2":"^2.0.0"},"devDependencies":{"gulp":"3.9.0"},"main":"dist/main.js","_id":"gulp-dependents@1.0.0","scripts":{},"_shasum":"14dc85bf0bc7aed1af77d1e200dad7172fed0289","_from":".","_npmVersion":"3.5.2","_nodeVersion":"4.2.3","_npmUser":{"name":"thomas-darling","email":"mail@thda.dk"},"dist":{"shasum":"14dc85bf0bc7aed1af77d1e200dad7172fed0289","tarball":"https://registry.npmjs.org/gulp-dependents/-/gulp-dependents-1.0.0.tgz","integrity":"sha512-/Ea0wYn5H9HfS7HMwTS5F9Treo5jiCz3s8mc2qmI+2xrKYCMBSlk+qc5LF/xjQejd633aJdLp0SH42GNI9mz6Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBys9wZJJLNvMclKNYh/rnQ4rAJNjS3y9lDigKA+cGF/AiEAhwbGhEi6txMbQkPJP2UrYl5SP667Zge+Q0qAud1pC7M="}]},"maintainers":[{"name":"thomas-darling","email":"mail@thda.dk"}],"directories":{}},"1.2.2":{"name":"gulp-dependents","version":"1.2.2","description":"Gulp plugin that tracks dependencies between files and adds any files that depend on the files currently in the stream, thus enabling incremental build of pcss, less, scss, sass, with extensibility points to support other file types.","keywords":["gulp","incremental","dependencies","dependents","dependent","include","import","compile","build","less","sass","scss"],"license":"MIT","author":{"name":"Thomas Darling"},"homepage":"https://github.com/thomas-darling/gulp-dependents","bugs":{"url":"https://github.com/thomas-darling/gulp-dependents/issues"},"repository":{"type":"git","url":"git+https://github.com/thomas-darling/gulp-dependents.git"},"dependencies":{"gulp-util":"^3.0.8","through2":"^2.0.3"},"devDependencies":{"@types/chalk":"^0.4.31","@types/gulp-util":"3.0.30","@types/mkdirp":"^0.3.29","@types/node":"7.0.4","@types/through2":"^2.0.32","@types/vinyl":"^2.0.0","typescript":"^2.1.1"},"scripts":{"prepublish":"tsc"},"types":"lib/index.d.ts","main":"lib/index.js","gitHead":"99a6d23b985c8225386ea6e32be1fd10088933dc","_id":"gulp-dependents@1.2.2","_shasum":"b9dad6a1417ded0855980a80031bc5aaeeb5b6f4","_from":".","_npmVersion":"3.8.9","_nodeVersion":"4.4.4","_npmUser":{"name":"thomas-darling","email":"mail@thda.dk"},"dist":{"shasum":"b9dad6a1417ded0855980a80031bc5aaeeb5b6f4","tarball":"https://registry.npmjs.org/gulp-dependents/-/gulp-dependents-1.2.2.tgz","integrity":"sha512-wqA9KtpOWaf9MuEETfq+y3SXxfW5kMg6/jRE/kp3HlytYTOjeERjSmZiSZ424eVOz47UnzjdqHnLJ/AiOzO5Tw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCID8ZWn3HlJ2momkwoxwOE/S/SOFGJ8AXOyT/IivQnsuxAiAlKIjdIetIcWEPyQkRCM8U/u0HFQ67azBI6qHDEJo8kw=="}]},"maintainers":[{"name":"thomas-darling","email":"mail@thda.dk"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/gulp-dependents-1.2.2.tgz_1485972781880_0.9320340291596949"},"directories":{}},"1.2.3":{"name":"gulp-dependents","version":"1.2.3","description":"Gulp plugin that tracks dependencies between files and adds any files that depend on the files currently in the stream, thus enabling incremental build of pcss, less, scss, sass, with extensibility points to support other file types.","keywords":["gulp","incremental","dependencies","dependents","dependent","include","import","compile","build","less","sass","scss"],"license":"MIT","author":{"name":"Thomas Darling"},"homepage":"https://github.com/thomas-darling/gulp-dependents","bugs":{"url":"https://github.com/thomas-darling/gulp-dependents/issues"},"repository":{"type":"git","url":"git+https://github.com/thomas-darling/gulp-dependents.git"},"dependencies":{"gulp-util":"^3.0.8","through2":"^2.0.3"},"devDependencies":{"@types/chalk":"^0.4.31","@types/gulp-util":"3.0.30","@types/mkdirp":"^0.3.29","@types/node":"7.0.4","@types/through2":"^2.0.32","@types/vinyl":"^2.0.0","typescript":"^2.1.1"},"scripts":{"prepublish":"tsc"},"types":"lib/index.d.ts","main":"lib/index.js","gitHead":"254637ec8cc56dd4e31d75eb49b2b06d82d46882","_id":"gulp-dependents@1.2.3","_shasum":"4976bbd517f03bd6545e853babcffe7eb6c94d47","_from":".","_npmVersion":"3.8.9","_nodeVersion":"4.4.4","_npmUser":{"name":"thomas-darling","email":"mail@thda.dk"},"dist":{"shasum":"4976bbd517f03bd6545e853babcffe7eb6c94d47","tarball":"https://registry.npmjs.org/gulp-dependents/-/gulp-dependents-1.2.3.tgz","integrity":"sha512-R/mIxDHAdbXzPAfSBGf39J2VIEYnzve2Jr/kmUfPP4wil7t4NLvWh4/FtnaB3Q4gwnAdqxa0jiz9LAn5qo9uOg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICSqowop61+8+bFHy/fodOOFtl5mzN//3ODsPpfrfME6AiEAnUGsCyVuoY2utVw3NpXKrCRfTyKS42G/0NT87zCNYHk="}]},"maintainers":[{"name":"thomas-darling","email":"mail@thda.dk"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/gulp-dependents-1.2.3.tgz_1486573391407_0.7801756102126092"},"directories":{}},"1.2.4":{"name":"gulp-dependents","version":"1.2.4","description":"Gulp plugin that tracks dependencies between files and adds any files that depend on the files currently in the stream, thus enabling incremental build of pcss, less, scss, sass, with extensibility points to support other file types.","keywords":["gulp","incremental","dependencies","dependents","dependent","include","import","compile","build","less","sass","scss"],"license":"MIT","author":{"name":"Thomas Darling"},"homepage":"https://github.com/thomas-darling/gulp-dependents","bugs":{"url":"https://github.com/thomas-darling/gulp-dependents/issues"},"repository":{"type":"git","url":"git+https://github.com/thomas-darling/gulp-dependents.git"},"dependencies":{"fancy-log":"^1.3.3","through2":"^3.0.1","vinyl":"^2.2.0"},"devDependencies":{"@types/chalk":"^2.2.0","@types/fancy-log":"^1.3.1","@types/mkdirp":"^1.0.0","@types/node":"^14.0.5","@types/through2":"^2.0.32","@types/vinyl":"^2.0.0","typescript":"^3.9.3"},"scripts":{"prepare":"tsc"},"types":"lib/index.d.ts","main":"lib/index.js","gitHead":"9467a88b9bd2fd8f8f4345d61d8a8e9cc8072f53","_id":"gulp-dependents@1.2.4","_nodeVersion":"11.9.0","_npmVersion":"6.14.5","dist":{"integrity":"sha512-Xx20eW4TSdkP8MMUuJd5htraIiD2iXI3oljSj336fnze2cngMVI7BAZngM/rvNmzrbL3BID8Pchv+P1v6RlWIA==","shasum":"c6115a55389f55ecd0e84cf82a0a06dffbf54fec","tarball":"https://registry.npmjs.org/gulp-dependents/-/gulp-dependents-1.2.4.tgz","fileCount":18,"unpackedSize":49686,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe32UHCRA9TVsSAnZWagAAqhsQAIc6/h191/Z0ZoypwuQB\nH/pHEZILYRNh+VaVu/TCXouCZR9aY81IgBrUgKMPE+4VSoVq8FhfCCZmzKI1\nx994c8tqc/Z0CfZGjBcVLEDT1sLl3mrg7ASgzzW4CdmJ04tS/v1ZSRFAmDUc\n8+s3YxAEo7ITK/8OmIACfYAsjK0pZ/xIUh+iaibVfs845XTKQjSjmqjQMxF/\neNsJmYCR9fDqHtUx+9sNOmw8/LG1wEHHXhAaDApQ2tENw+w8fUIpYjNN3P2/\nMecxSsePq6Jw2VmAtbD0OeUFgnPuvmCFhHX2Sc2cuYideicRkaVr44PUYanc\n60uIb67Au5wO4MSXlYp1nhlzQKsbMEUBWJ6RqZLaif+YfjOLoDrDB7nPy0qS\nvbc0j1TaqbgEnJztDiYMU8n0c5vMCgw4vtuUg/QZRWLzeOT1SMkLy3KYl2Wj\nv6/2/pH9MrmtrASa/xG0kMh4kHUAH02vf0u5vYhmbt1XjxU3qjJ3uRf4Uj/9\nCm9yeAs4xon3nIQPY6GL72DizdXLrHAo8QGdFnltKxbZ7PGYb73xjWka41Z+\nQ9zyr6kBvmV2FlvVrjnKVfFqRN0vkWdNg7iV6KmWYJ0+QOKZJx6QlIj7dD9p\nqj0jZlNniBRbY0ycySiU9asgitNT0OfBXSVgNTjG9D8JGyoiZaQ//LcOJ6Pz\nkFoE\r\n=Cjz/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC8xjs+w64fMEVRZPL1/U23RCxqVocX574iYlEItcDHqAIhAMjNxM1Ef0iLcAQJK765/z9iFQML7KAVvE7BhhoxkmEa"}]},"maintainers":[{"name":"thomas-darling","email":"mail@thda.dk"}],"_npmUser":{"name":"thomas-darling","email":"mail@thda.dk"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/gulp-dependents_1.2.4_1591698694843_0.40033478283140367"},"_hasShrinkwrap":false},"1.2.5":{"name":"gulp-dependents","version":"1.2.5","description":"Gulp plugin that tracks dependencies between files and adds any files that depend on the files currently in the stream, thus enabling incremental build of pcss, less, scss, sass, with extensibility points to support other file types.","keywords":["gulp","incremental","dependencies","dependents","dependent","include","import","compile","build","less","sass","scss"],"license":"MIT","author":{"name":"Thomas Darling"},"homepage":"https://github.com/thomas-darling/gulp-dependents","bugs":{"url":"https://github.com/thomas-darling/gulp-dependents/issues"},"repository":{"type":"git","url":"git+https://github.com/thomas-darling/gulp-dependents.git"},"dependencies":{"fancy-log":"^1.3.3","through2":"^3.0.1","vinyl":"^2.2.0"},"devDependencies":{"@types/chalk":"^2.2.0","@types/fancy-log":"^1.3.1","@types/mkdirp":"^1.0.0","@types/node":"^14.0.5","@types/through2":"^2.0.32","@types/vinyl":"^2.0.0","typescript":"^3.9.3"},"scripts":{"prepare":"tsc"},"types":"lib/index.d.ts","main":"lib/index.js","gitHead":"dbc6cbc2b4ca85c9d9a326a242595a813292d68a","_id":"gulp-dependents@1.2.5","_nodeVersion":"11.9.0","_npmVersion":"6.14.5","dist":{"integrity":"sha512-zwZzr4yxEVKlW96Ch9DS6KsmA9XrHYWYFTdJ3q7GaG6uiVNAsZUR57BlLBRCV0YkVL0sfMozJcQOGdxyOxcjQA==","shasum":"fac80cdd4a2bd1b009dc5124c3ccc4211c311b17","tarball":"https://registry.npmjs.org/gulp-dependents/-/gulp-dependents-1.2.5.tgz","fileCount":18,"unpackedSize":50037,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe6yQbCRA9TVsSAnZWagAAmt8P/A8wOqW1fnJRzkXqYz++\n6mtbdx4HzVETLHmYUIaQchwNv5ALY8JhGBn6roQ+0njRWGQsBCa9+Kwfb9h4\nA6gf6lU2ebqGgEbnm1iBHwqnOoi21qyLahVh0Ql/aSxJnjM9gLa6uf1fv3Gk\ncjm+HYSYiAWMFw0/+equ918NQT/7tDurYquj1t8ICuUA03j8JjUfGivNt3IU\na0fxosSF+iNpbBk6t6779BTqAvpWs4JWlutpyoUqKKadKglDzw+V/i7utLL3\nVyjj+gmAp8tL0iPZBIuEgcAr5n9SsO+S7aPkuV864VIBxp+aTj8HZI6rOw5N\n8jg6lkGMbsyNkwMEngwVnGCVcJR7aVpXUB1Gb5+kxJLJ2AH1yezLchn2i/i2\n+BWHMRCOP4eBtKK4z6M1G2JLIs+XQ1tCremH0xfl7Qe6T7VAKAQXEBWoXqvS\niHrI+EJLyBdUmb1kG0W0VY/fqT19MazNE983uUKMaWVUftYhuNj8hz1z9rRm\n7kRJrpODwgVc8p75kuhw5Y2PKnU586qebVkJ8rHhJWkx3y7ep/6/F1gmNPXF\nLKWIT1v1rDP8Vjvj6371NmF4bSASPkRoTi9pYvQ41GtB+Qn8R3Ztd2zCqV8s\n64fG/WAIUzvW6NtZ4DxuzfrwJcuqPJY2Phapmte/oWqGke1rgJDAnPxD5HW9\nIaV0\r\n=wjSR\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD5ZL/BuwE8p9468TMUJ81/M9laTCh7POj25BwoFJSJDQIhAJDIPDYW4DoqJZuX0tDS6dxDhK9T8VR00PyFh4rWH4/C"}]},"maintainers":[{"name":"thomas-darling","email":"mail@thda.dk"}],"_npmUser":{"name":"thomas-darling","email":"mail@thda.dk"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/gulp-dependents_1.2.5_1592468506873_0.7261087509757134"},"_hasShrinkwrap":false}},"readme":"﻿gulp-dependents\n===============\n\n[![Version](https://img.shields.io/npm/v/gulp-dependents.svg)](https://www.npmjs.org/package/gulp-dependents)\n[![Downloads](https://img.shields.io/npm/dm/gulp-dependents.svg)](https://www.npmjs.com/package/gulp-dependents)\n\nGulp plugin that tracks dependencies between files and adds any files that depend\non the files currently in the stream, thus enabling incremental build of `pcss`,\n`less`, `scss` and `sass` files, with extensibility points to support other file\ntypes.\n\n## Problem\nGulp makes it easy to build all your files, but as the code base grows, so does\nthe build time, significantly slowing down your workflow. The solution is\nincremental building - i.e. to rebuild only the files that have actually changed.\nUnfortunately Gulp is agnostic about the depenencies between your files, making\nit hard to incrementally build files that depend on other files - it doesn't know,\nthat when a dependency changes, so does the files that depend on it.\n\n## Solution\nThis plugin tracks the dependencies of all the files that pass trough it, building\nand maintaining an in-memory dependency tree describing the dependencies between\nthe files. For each file that passes through, it will add any files that directly\nor indirectly depend on that file to the stream, thus ensuring that they will also\nbe rebuild. Combined with e.g. the [gulp-cached](https://www.npmjs.com/package/gulp-cached)\nplugin, or the \"since last run\" option in Gulp 4, this enables fast and reliable\nincremental builds.\n\n## Usage\nThis example shows how the plugin may be used to watch and incrementally build\n`less` files. The `gulp-cached` plugin will pass all files through on the first\nrun, thus allowing `gulp-dependents` to set up the initial dependency graph. On\nsubsequent runs, only changed files will be passed through, and `gulp-dependents`\nwill then ensure that any dependent files are also pulled into the stream.\n\n```javascript\n\nvar gulp = require('gulp'),\n    less = require('gulp-less'),\n    cached = require('gulp-cached'),\n    dependents = require('gulp-dependents');\n\ngulp.task('watch', function() {\n    gulp.watch('src/**/*.less', ['build']);\n});\n\ngulp.task('build', function() {\n    return gulp\n        .src('src/**/*.less')\n        .pipe(cached('less'))\n        .pipe(dependents())\n        .pipe(less())\n        .pipe(gulp.dest('dist'))\n});\n\n```\n\nPlease note that although they serve a similar pourpose, `gulp-cached` and `gulp-changed`\nhave different behavior - `gulp-changed` will *not* nessesarily pass all files through on first run.\nInstead, it compares the timestamps of the source and destination files, and only pass through those\nthat appear to be different. This means, that if you want to use `gulp-changed` instead of `gulp-cached`,\nyou must clean your output folder every time your watch task starts, as this plugin needs to process all\nfiles at least once, in order to determine the initial dependency tree - it won't know a file depends on\nanother, until it has parsed its dependency statements at least once.\n\n## Support and limitations\nOut of the box, this plugin supports `pcss`, `less`, `scss` and `sass` files, including\nthings like comma-separated path lists, import statements spanning multiple lines\nand `url(...)` paths. For `sass`, which is the indent-based variant of the `scss`\nsyntax, support is limited to single-line import statements. Also note, that due to the\nway tracking is implemented, it is currently not possible to support dependency\nstatements with glob patterns, referencing e.g. all files in a folder.\n\n## Configuration\nFor the file types supported out of the box, there's generally no need to\nconfigure anything, but should the need arise, a parser configuration may be\npassed to the plugin function. Note that the options are merged into the\ndefault configuration, so if you only wish to override e.g. the `basePaths`\noption for  `scss` files, then simply specify only that property.\n\nThe parser will apply each `RegExp` or `function` in the `parserSteps` array in\nsequence, such that the first receives all the file content and may e.g. extract\nwhole dependency statements, and the second one may then extract the paths from\nthose statements. This design enables parsing of complex statements that e.g.\nlist multiple, comma-separated file paths. It also enables the use of external\nparsers, by specifying a function, which simply invokes the external parser to\nget the dependency paths.\n\n```javascript\n\n// The parser configuration, in which keys represents file name\n// extensions, including the dot, and values represent the config\n// to use when parsing the file type.\nvar config = {\n\n    \".scss\": {\n\n        // The sequence of RegExps and/or functions to use when parsing\n        // dependency paths from a source file. Each RegExp must have the\n        // 'gm' modifier and at least one capture group. Each function must\n        // accept a string and return an array of captured strings. The\n        // strings captured by each RegExp or function will be passed\n        // to the next, thus iteratively reducing the file content to an\n        // array of dependency file paths.\n        parserSteps: [\n\n            // PLEASE NOTE:\n            // The parser steps shown here are only meant as an example to\n\t\t\t// illustrate the concept of the matching pipeline.\n            // The default config used for scss files is pure RegExp and\n            // reliably supports the full syntax of scss import statements.\n\n            // Match the import statements and capture the text\n            // between '@import' and ';'.\n            /^\\s*@import\\s+(.+?);/gm,\n\n            // Split the captured text on ',' to get each path.\n            function (text) { return text.split(\",\"); },\n\n            // Match the balanced quotes and capture only the file path.\n            /\"([^\"]+)\"|'([^']+)'/m\n        ],\n\n        // The file name prefixes to try when looking for dependency\n        // files, if the syntax does not require them to be specified in\n        // dependency statements. This could be e.g. '_', which is often\n        // used as a naming convention for mixin files.\n        prefixes: ['_'],\n\n        // The file name postfixes to try when looking for dependency\n        // files, if the syntax does not require them to be specified in\n        // dependency statements. This could be e.g. file name extensions.\n        postfixes: ['.scss', '.sass'],\n\n        // The additional base paths to try when looking for dependency\n        // files referenced using relative paths.\n        basePaths: [],\n    }\n};\n\n// Pass the config object to the plugin function.\n.pipe(dependents(config))\n\n// You can also pass a second config argument to enable logging.\n.pipe(dependents(config, { logDependents: true }))\n\n```\n\nEnjoy, and please report any issues in the issue tracker :-)","maintainers":[{"name":"thomas-darling","email":"mail@thda.dk"}],"time":{"modified":"2022-06-18T16:56:30.665Z","created":"2016-01-20T22:49:17.592Z","1.0.0":"2016-01-20T22:49:17.592Z","1.2.2":"2017-02-01T18:13:03.943Z","1.2.3":"2017-02-08T17:03:12.068Z","1.2.4":"2020-06-09T10:31:35.000Z","1.2.5":"2020-06-18T08:21:47.023Z"},"homepage":"https://github.com/thomas-darling/gulp-dependents","keywords":["gulp","incremental","dependencies","dependents","dependent","include","import","compile","build","less","sass","scss"],"repository":{"type":"git","url":"git+https://github.com/thomas-darling/gulp-dependents.git"},"author":{"name":"Thomas Darling"},"bugs":{"url":"https://github.com/thomas-darling/gulp-dependents/issues"},"license":"MIT","readmeFilename":"readme.md","users":{"caikan":true}}