{"_id":"gulp-html-src","_rev":"12-a2b715737192c1dea0f28bb8e629a846","name":"gulp-html-src","description":"Gulp plugin to accept HTML input, and output the linked JavaScript (script tags) and CSS (link tags)","dist-tags":{"latest":"1.0.0"},"versions":{"0.0.1":{"name":"gulp-html-src","version":"0.0.1","description":"Gulp plugin to accept HTML input, and output the linked JavaScript (script tags) and CSS (link tags)","main":"./index.js","repository":{"type":"git","url":"git://github.com/davegb3/gulp-html-src.git"},"homepage":"http://github.com/davegb3/gulp-html-src","author":{"name":"Dave Brotherstone"},"licenses":[{"type":"MIT","url":"http://github.com/davegb3/gulp-html-src/raw/master/LICENSE"}],"scripts":{"test":"mocha"},"dependencies":{"vinyl":"~0.2.3","through2":"~0.4.1","cheerio":"~0.13.1","extend":"~1.2.1","q":"~1.0.1"},"devDependencies":{"mocha":"*","chai":"*","gulp-util":"~2.2.14"},"engines":{"node":">= 0.10.0"},"keywords":["gulp","html","script","link","gulpplugin","gulp-plugin"],"bugs":{"url":"https://github.com/davegb3/gulp-html-src/issues"},"_id":"gulp-html-src@0.0.1","dist":{"shasum":"cd3c28d9eebbb663c11ac39811205a5a52ba7c9b","tarball":"https://registry.npmjs.org/gulp-html-src/-/gulp-html-src-0.0.1.tgz","integrity":"sha512-yomVImVkD8hf+sLRTipiIQPjFB03GQzcb1YB0ZfdPTQYSCPEzVC+7KZUeC8gfTGyqOEC10YXHCzcVZtds0EByQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDMdrFNNyBH9Fdu31z9oBdmeNtaV6Em+RKZs3w9uLviSgIgF8GcEcKRVCPF27rPdh/xs2lcmDxp9dNS8slaj+1VU6Q="}]},"_from":".","_npmVersion":"1.3.11","_npmUser":{"name":"davegb3","email":"davegb@pobox.com"},"maintainers":[{"name":"davegb3","email":"davegb@pobox.com"}]},"0.2.0":{"name":"gulp-html-src","version":"0.2.0","description":"Gulp plugin to accept HTML input, and output the linked JavaScript (script tags) and CSS (link tags)","main":"./index.js","repository":{"type":"git","url":"git://github.com/davegb3/gulp-html-src.git"},"homepage":"http://github.com/davegb3/gulp-html-src","author":{"name":"Dave Brotherstone"},"licenses":[{"type":"MIT","url":"http://github.com/davegb3/gulp-html-src/raw/master/LICENSE"}],"scripts":{"test":"mocha"},"dependencies":{"vinyl":"~0.2.3","through2":"~0.4.1","cheerio":"~0.13.1","extend":"~1.2.1","q":"~1.0.1"},"devDependencies":{"mocha":"*","chai":"*","gulp-util":"~2.2.14"},"engines":{"node":">= 0.10.0"},"keywords":["gulp","html","script","link","gulpplugin","gulp-plugin"],"bugs":{"url":"https://github.com/davegb3/gulp-html-src/issues"},"_id":"gulp-html-src@0.2.0","_shasum":"70cd2ce23a118393d927d2b443efffd0986b2eb2","_from":".","_npmVersion":"1.4.8","_npmUser":{"name":"davegb3","email":"davegb@pobox.com"},"maintainers":[{"name":"davegb3","email":"davegb@pobox.com"}],"dist":{"shasum":"70cd2ce23a118393d927d2b443efffd0986b2eb2","tarball":"https://registry.npmjs.org/gulp-html-src/-/gulp-html-src-0.2.0.tgz","integrity":"sha512-q0o/4kLXwElzBmoyHdSPzAd7lSQMm00qFVH54iH3iub5HeiCJZalnb/BRaMX30zGlq9WKb1TviLsI+UjFhbsQA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDkdT2RT1j+zKEiD9p05PmqfrHsVavRV0RJ8oIlm5qvBAiAPN1zDQ9T8RE213FnYx+p98jEsIG8ioW5FsixpMTNRBQ=="}]}},"1.0.0":{"name":"gulp-html-src","version":"1.0.0","description":"Gulp plugin to accept HTML input, and output the linked JavaScript (script tags) and CSS (link tags)","main":"./index.js","repository":{"type":"git","url":"git://github.com/davegb3/gulp-html-src.git"},"homepage":"http://github.com/davegb3/gulp-html-src","author":{"name":"Dave Brotherstone"},"licenses":[{"type":"MIT","url":"http://github.com/davegb3/gulp-html-src/raw/master/LICENSE"}],"scripts":{"test":"mocha"},"dependencies":{"vinyl":"~0.2.3","through2":"~0.4.1","cheerio":"~0.13.1","extend":"~1.2.1","q":"~1.0.1"},"devDependencies":{"mocha":"*","chai":"*","gulp-util":"~2.2.14"},"engines":{"node":">= 0.10.0"},"keywords":["gulp","html","script","link","gulpplugin","gulp-plugin"],"gitHead":"42a45f27ba6380346d54cd252cd110c20ac21278","bugs":{"url":"https://github.com/davegb3/gulp-html-src/issues"},"_id":"gulp-html-src@1.0.0","_shasum":"f0744d86727b64029df95c3af9888a3c10ff6d8b","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"davegb3","email":"davegb@pobox.com"},"maintainers":[{"name":"davegb3","email":"davegb@pobox.com"}],"dist":{"shasum":"f0744d86727b64029df95c3af9888a3c10ff6d8b","tarball":"https://registry.npmjs.org/gulp-html-src/-/gulp-html-src-1.0.0.tgz","integrity":"sha512-xignSakta2df5I/hZbXWeSuClBQdR8mHf2I4xlQg1GrKmfb6Rn3H+NU1NDOm2JKU68i5zjMsjvXI/WJK/et7nQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEoS9abHT6XuxwyIfIaqaFUvdIEQ1qodAqqKoKQ/KXTDAiEA2456SGp0+ayPyV33NvnnGEd9DroTiZtttPya32Z40xA="}]}}},"readme":"#gulp-html-src\n\nConvert the HTML input to all the linked script or link/css tags\n\nStreams are supported.  (It will emit whatever it gets - i.e. streams in, streams out; Buffer in, Buffer out)  \n\n## Usage\n\n#### Install\n    npm install gulp-html-src --save\n\n## Example\n\n```js\nvar gulp = require('gulp');\nvar ghtmlSrc = require('gulp-html-src');\nvar uglify = require('gulp-uglify');\n\ngulp.task('copy-js', function() {\n\tgulp.src('./src/*.html')\n\t\t.pipe(ghtmlSrc())\n\t\t// From this point, it's as if you'd used gulp.src() listing each of your \n\t\t// javascript files that are in your html as <script src=\"...\"></script>\n\t\t.pipe(uglify())\n\t\t.pipe(gulp.dest('./build/'));\n\n});\n\ngulp.task('copy-css', function() {\n\tgulp.src('./src/*.html')\n\t\t.pipe(ghtmlSrc({ presets: 'css'}))\n\t\t.pipe(gulp.dest('./build/'));\n});\n\n```\n\n## Options\n\n## Basic usage\n\n`ghtmlSrc(options)`, where options is an object with the following properties.  If you pass no options, then the presets for `script` are used.\n\n\nYou can use the `presets` option to choose either script or css files to enumerate.\n\nIt will skip any script or link tags with data-remove=\"true\" or data-ignore=\"true\" set.  You can then use these tags to control what to remove when you remove the script tags from your HTML later.\n\n### options.presets\n\n    Type: `String`\n    Default: `script`\n    Possible Values: `script`, `css`\n\n### options.includeHtmlInOutput\n\n    Type: `bool`\n    Default: `false`\n\t\n\nBy default the original HTML file (that probably came from gulp.src()) is swallowed by `gulp-html-src`, and it only emits the matching script or css files.  However, if you want to keep the HTML in the stream, then set this option to true.  One use of this could be to blindly copy the HTML and all references to a destination directory.\n\n\n## Advanced usage\n\nThe following options are not used for the \"normal\" cases, but could be useful if you want to do something more advanced (for instance select all images out of an HTML file).  These options individually override the presets, so it's perfectly fine to specify `presets:'script'`, and then override the `selector` to be `'img'`, leaving the `getFileName` function as the default.   \n\n### options.selector\n\n    Type: `String`\n    Default: For presets == `script`, `script:not([data-ignore=true], [data-remove=true])`, for presets == `css`, `link[type=\"text/css\"][rel=stylesheet]:not([data-ignore=true], [data-remove=true])`\n \n\nThis is the [cheerio](https://github.com/cheeriojs/cheerio) selector (basically a jQuery selector) for the elements to select.  See `options.getFileName` for how this element is converted to a filename.\n\n### options.getFileName\n\n     Type: `function`\n     Arguments: `element` - a single element selected by the `selector`\n     Returns: The name of the file to open (relative to the HTML file)\n\nThis function is called with each matching element from the `selector`, and returns the relative filename.  For `presets == script`, this is\n\n```js\nfunction getFileName(node) {\n\treturn node.attr('src');\n}\n```\n\n\n\n","maintainers":[{"name":"davegb3","email":"davegb@pobox.com"}],"time":{"modified":"2022-06-18T17:13:31.744Z","created":"2014-04-10T16:19:24.589Z","0.0.1":"2014-04-10T16:19:26.658Z","0.2.0":"2014-05-27T05:29:25.849Z","1.0.0":"2015-03-15T15:06:34.453Z"},"readmeFilename":"README.md","homepage":"http://github.com/davegb3/gulp-html-src","keywords":["gulp","html","script","link","gulpplugin","gulp-plugin"],"repository":{"type":"git","url":"git://github.com/davegb3/gulp-html-src.git"},"author":{"name":"Dave Brotherstone"},"bugs":{"url":"https://github.com/davegb3/gulp-html-src/issues"},"users":{"rubiadias":true,"calin.buzatu":true}}