{"_id":"gulp-html-import","_rev":"6-e52432e175845d54334301157d8aaf66","name":"gulp-html-import","description":"A gulp plugin which can import .html files into .html files","dist-tags":{"latest":"0.0.2"},"versions":{"0.0.1":{"name":"gulp-html-import","version":"0.0.1","description":"A gulp plugin which can import .html files into .html files","main":"index.js","dependencies":{"gulp-util":"^3.0.7","through2":"^2.0.1"},"devDependencies":{},"scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"keywords":["gulp","gulpplugin","html","import"],"author":{"name":"Jrain Lau"},"license":"MIT","gitHead":"03714c9911309fde6053a5ca5c1053a985b66497","_id":"gulp-html-import@0.0.1","_shasum":"de49ac8fe9ab62ac179e1e9e77f72a0ce282267a","_from":".","_npmVersion":"3.3.12","_nodeVersion":"5.4.1","_npmUser":{"name":"jrainlau","email":"jrainlau@163.com"},"dist":{"shasum":"de49ac8fe9ab62ac179e1e9e77f72a0ce282267a","tarball":"https://registry.npmjs.org/gulp-html-import/-/gulp-html-import-0.0.1.tgz","integrity":"sha512-JMuuQZh8seiaiYhYAJpmoqOKSHAEe8Ex7vPKr8bwFZsswXerxz8CEU82QacpCbCtlpE9Fb14qxMDMC+wcasoVQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC+fESpOpjz9XrvxIj0VLfO9lZ9/YuIXyqv2cNbJJ1GQwIgdVIuhtwp69yWgoOMt1mC7KC1pn+TClYr6aFsIxSc98A="}]},"maintainers":[{"name":"jrainlau","email":"jrainlau@163.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/gulp-html-import-0.0.1.tgz_1465895312156_0.4480199599638581"}},"0.0.2":{"name":"gulp-html-import","version":"0.0.2","description":"A gulp plugin which can import .html files into .html files","main":"index.js","dependencies":{"gulp-util":"^3.0.7","through2":"^2.0.1"},"devDependencies":{},"scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"keywords":["gulp","gulpplugin","html","import"],"author":{"name":"Jrain Lau"},"license":"MIT","gitHead":"b6736b216ee1ac121c1c718ec3948ce7e24610ba","_id":"gulp-html-import@0.0.2","_shasum":"25994f33f3d81ab64be694b26d6f1da1146567fa","_from":".","_npmVersion":"3.3.12","_nodeVersion":"5.4.1","_npmUser":{"name":"jrainlau","email":"jrainlau@163.com"},"dist":{"shasum":"25994f33f3d81ab64be694b26d6f1da1146567fa","tarball":"https://registry.npmjs.org/gulp-html-import/-/gulp-html-import-0.0.2.tgz","integrity":"sha512-YE8nSh2ZAHpgOjOsfM1xHmnxyTeh9bjz5IYXPBEUOjaA0m4CRID5uWiN3fYk9Aye5icU25W++sy2mDRm57VWPw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCbJxGo0fKzWMtrsSBi3y1nVK4nsOol2M90Y0xUULtjjQIgI6OHYbJWeU5U3qzB0qxA13ytUV6FFlqLqtSnJyxadt8="}]},"maintainers":[{"name":"jrainlau","email":"jrainlau@163.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/gulp-html-import-0.0.2.tgz_1465895597177_0.9356902614235878"}}},"readme":"# gulp-html-import\r\n> A gulp plugin which can import .html files into .html files\r\n\r\n## Usage\r\nFirst, install `gulp-html-import` as a devDependency:\r\n```\r\nnpm install gulp-html-import --save-dev\r\n```\r\nThen add it to the `gulpfile.js`:\r\n```\r\nvar htmlImport = require('gulp-html-import');\r\n\r\ngulp.task('import', function () {\r\n    gulp.src('./demo/index.html')\r\n        .pipe(gulpImport('./demo/components/'))\r\n        .pipe(gulp.dest('dist')); \r\n})\r\n```\r\n\r\n## Example\r\nHere is the files tree:\r\n```\r\n|\r\n-- demo\r\n|   |\r\n|   -- components\r\n|   |    |\r\n|   |    -- header.html\r\n|   |    |\r\n|   |    -- footer.html\r\n|   |\r\n|   -- index.html\r\n|\r\n-- gulpfile.js\r\n```\r\nHtml files:\r\n```\r\n<!-- index.html -->\r\n\r\n<!DOCTYPE html>\r\n<html lang=\"en\">\r\n<head>\r\n    <meta charset=\"UTF-8\">\r\n    <title>Gulp-html-import Example</title>\r\n</head>\r\n<body>\r\n    @import \"header.html\"\r\n    <p>Hello World</p>\r\n    @import \"footer.html\"\r\n</body>\r\n</html>\r\n```\r\nIn your `index.html`, you should use\r\n```\r\n@import \"XXX.html\"\r\n```\r\nto import your components.\r\n```\r\n<!-- header.html -->\r\n\r\n<h1>I am the header</h1>\r\n```\r\n```\r\n<!-- footer.html -->\r\n\r\n<h1>I am the footer</h1>\r\n```\r\nWhen you get into the root directory(where your `gulpfile.js` is) and type\r\n\r\n ```\r\ngulp import\r\n```\r\n\r\n you could see a html file in `/dist` like this:\r\n```\r\n<!-- /dist/index.html -->\r\n\r\n<!DOCTYPE html>\r\n<html lang=\"en\">\r\n<head>\r\n    <meta charset=\"UTF-8\">\r\n    <title>Gulp-html-import Example</title>\r\n</head>\r\n<body>\r\n    <h1>I am the header</h1>\r\n    <p>Hello World</p>\r\n    <h1>I am the footer</h1>\r\n</body>\r\n</html>\r\n```\r\nEverything is OK.\r\n\r\n## API\r\n### htmlImport(string)\r\n#### string\r\nType: `String`\r\n\r\nThe url of your components\r\n\r\n---\r\n[MIT](https://opensource.org/licenses/MIT)\r\n\r\nCopyright © 2016 Jrain Lau","maintainers":[{"name":"jrainlau","email":"jrainlau@163.com"}],"time":{"modified":"2022-06-18T17:12:59.761Z","created":"2016-06-14T09:08:35.251Z","0.0.1":"2016-06-14T09:08:35.251Z","0.0.2":"2016-06-14T09:13:20.084Z"},"keywords":["gulp","gulpplugin","html","import"],"author":{"name":"Jrain Lau"},"license":"MIT","readmeFilename":"README.md","users":{"yinluobing":true,"ruslan.garaev":true}}