{"_id":"@boehs/gulp-js-text-inject","_rev":"3-0374a3ddd4d7eb7271a1b68046746148","name":"@boehs/gulp-js-text-inject","dist-tags":{"latest":"1.0.3"},"versions":{"1.0.2":{"name":"@boehs/gulp-js-text-inject","version":"1.0.2","description":"Gulp plugin for injecting referenced text files back into JS code as strings","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/boehs/gulp-js-text-inject.git"},"keywords":["gulpplugin","js-text-inject","embed-data"],"author":{"name":"Benny Bottema","email":"b.bottema@projectnibble.org"},"contributors":[{"name":"Vladimir Marchevsky","email":"vladimmi@gmail.com"},{"name":"Evan Boehs","email":"evan@boehs.org"}],"license":"MIT","bugs":{"url":"https://github.com/boehs/gulp-js-text-inject/issues"},"homepage":"https://github.com/boehs/gulp-js-text-inject","dependencies":{"through2":"^0.6.5","xtend":"^4.0.0"},"gitHead":"38296b870414059bc3979a5fded9998761ebb0b1","_id":"@boehs/gulp-js-text-inject@1.0.2","_nodeVersion":"16.13.2","_npmVersion":"8.1.2","dist":{"integrity":"sha512-xpaMCL/YZbE4N0AAeeSvwK1fwHQrVBL9Ky/15fOl/Mv7a7Iq7c2SIHFSydFpMHs7/RGA7/9vKh6PWxdt9X694Q==","shasum":"a1eb7a72e7d884bfaabced95e83e30da9902a435","tarball":"https://registry.npmjs.org/@boehs/gulp-js-text-inject/-/gulp-js-text-inject-1.0.2.tgz","fileCount":3,"unpackedSize":4636,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiQOudACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmpp9g/+JinDu8h3GusUJU5/tDVdKhJDqi0+OjDxlEVS9EoMU7MSGoXk\r\nU60lXO2h1SItBkLESxl3FeRzyLtUE2om28ntJrKDF1dedihUa5hnOozoDilA\r\nrtkjM4M34X8V98NBO4Bj4Vm/dp3QPR7feqwwp/A4eqtRhDGJeTt9RslCZti5\r\nb4kEg+ra9YwFEByfCtkYsDHBnbacqXa+kaeUhT0X4/uKyzvqhG8JR/SrnWgA\r\nXri5gxYUlnC3f44EFk4GG/9O3V8LjsCLaT7TdTi6zj0W0u8SwBILXD9mhMMq\r\nHWReqhEgpsUjczU/WNX3dO+kU6Ex3H8XpxSV8Vwf88Qx9vOdTWFTor/xu3WF\r\nO666008y28lFFZAxGak05aoxbYU8dXvCPcaZ0NG9R/09N16JCNO6G0zo2IWm\r\nOMe6uRVH1sAP/qIQkRUeZe57YGXj47cKdEbPhi3dB33+jFC9Su82J4CC52t8\r\nMqunqTL9/LE+V19zXAurYNn56j7BqmZxyYR5G970oh1CkujgoHlqhjvnc4Yt\r\nELiIEQ6VAadKQsM3cOEhsSzbsTWh7ZRFIzr4Adu8WSiUh4uKA667l8psD6mD\r\n0pBvqdbewjFZbSUfR5TtYBCgEOYdSmO29xpjsrxVx1iAASL4l/MGsWyRfUvK\r\n/bwrpJtJIjJ0kJlk1kfmWqzJIWhNu42vpTk=\r\n=dvG8\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBZ1m18F7GFKJNg6evaZSDbzIBev71kcHuL+Nr7kynANAiBS0OLiEmlQSH/hahaA8PO6f8c1JiZbUSo+cC47wlO+/Q=="}]},"_npmUser":{"name":"boehs","email":"ebrobot2000@gmail.com"},"directories":{},"maintainers":[{"name":"boehs","email":"ebrobot2000@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/gulp-js-text-inject_1.0.2_1648421789837_0.9079714785444055"},"_hasShrinkwrap":false,"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"1.0.3":{"name":"@boehs/gulp-js-text-inject","version":"1.0.3","description":"Fixed version of text-inject","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/boehs/gulp-js-text-inject.git"},"keywords":["gulpplugin","js-text-inject","embed-data"],"author":{"name":"Benny Bottema","email":"b.bottema@projectnibble.org"},"contributors":[{"name":"Vladimir Marchevsky","email":"vladimmi@gmail.com"},{"name":"Evan Boehs","email":"evan@boehs.org"}],"license":"MIT","bugs":{"url":"https://github.com/boehs/gulp-js-text-inject/issues"},"homepage":"https://github.com/boehs/gulp-js-text-inject","dependencies":{"@boehs/gulp-js-text-inject":"^1.0.2","through2":"^0.6.5","xtend":"^4.0.0"},"gitHead":"38296b870414059bc3979a5fded9998761ebb0b1","_id":"@boehs/gulp-js-text-inject@1.0.3","_nodeVersion":"16.13.2","_npmVersion":"8.1.2","dist":{"integrity":"sha512-F64i7WSck7ou64PFWshukDgUf6i3r2OfZrwHUKMlUPNfbIeXMkzPsDyDhvt6vz26RbzJWPKmt2j2K7dtPhqRnA==","shasum":"107ce9b20bbd03402cae0527e153bbff8557e147","tarball":"https://registry.npmjs.org/@boehs/gulp-js-text-inject/-/gulp-js-text-inject-1.0.3.tgz","fileCount":4,"unpackedSize":6185,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiQS3uACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp4Dw//Vje+gSFgiYTkTOo/VaRHi5VpHK2nWGWLxPL8zagc26zNAASe\r\nTygJxHze8KqpehPi6hynTlubjqRASGxQNH//Mg5Z2Gvv/3C4Jf9vOCio3xS7\r\n0rZszKwW+xNGNYfEYOnStD3gJD/nkuElYeL7tXZfAns3S7D0qwrKHBGa5GVO\r\n8E+31BU5QcQI7niiQuaTK1Wzged+Bq9aPtmujHbsSRijwbXFmpZuwFBXg6nk\r\nZj4WIo8Zq0Vg1ji6fIeqHAP2WH85M/7wa0DAmjudznu/qw6QUPiR4tKyzGXa\r\nJS+bDtWGFtV90650KXVFiibBGse3VJ7Jzt+TWpbjqUGUSo5DVgDkuxKUhUej\r\nlPH6IW9fZwBKZVQ9CwoyKDGNyNkomg9b3pDyB2WWvvoqGBJtjaR2vQ/agLqW\r\n7aYGJaQqiW4M9/4Yl/Z/Noft4iO2/yp2ygeI724/4yLr2bPRo9SW8/PIE+7U\r\nA11+m5FgcxfF2H5P8KgUKGcqgTmKO0OaG43sS0KvU3Scv1WvS2Dkk7XKUS0H\r\n0GmeVmu69wRLkvaBVnCYCxKVh9puh+MyYp5Fkj19T7BodkEgq3kiIY9nFSqa\r\nCUrcBCDYGkUlnIEmLL2dihKdN6aQwFg9bUVrLL7v/UIMYyJP2nzPYc9t9P5h\r\nfYILo8IrwR1z7jAOSaxU3P3DKQ1vwdkpxps=\r\n=fMyc\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICP5EVz+d0RkU+lJfuGGyXdjlqcOnQgAAJR20ATMTF5yAiByoed5YmqpC3VkAsRf+IS/qE9cCLgJZVu0NkUyqSmWPQ=="}]},"_npmUser":{"name":"boehs","email":"ebrobot2000@gmail.com"},"directories":{},"maintainers":[{"name":"boehs","email":"ebrobot2000@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/gulp-js-text-inject_1.0.3_1648438766696_0.3195429441966098"},"_hasShrinkwrap":false,"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."}},"time":{"created":"2022-03-27T22:56:29.777Z","1.0.2":"2022-03-27T22:56:29.984Z","modified":"2023-12-21T15:22:13.956Z","1.0.3":"2022-03-28T03:39:26.864Z"},"maintainers":[{"name":"boehs","email":"ebrobot2000@gmail.com"}],"description":"Fixed version of text-inject","homepage":"https://github.com/boehs/gulp-js-text-inject","keywords":["gulpplugin","js-text-inject","embed-data"],"repository":{"type":"git","url":"git+https://github.com/boehs/gulp-js-text-inject.git"},"contributors":[{"name":"Vladimir Marchevsky","email":"vladimmi@gmail.com"},{"name":"Evan Boehs","email":"evan@boehs.org"}],"author":{"name":"Benny Bottema","email":"b.bottema@projectnibble.org"},"bugs":{"url":"https://github.com/boehs/gulp-js-text-inject/issues"},"license":"MIT","readme":"# gulp-js-text-inject\n\nThis is a small Gulp plugin for injecting text files right directly into your .js code as strings.\n\n## What is it\n\nThe simplest example. JS code:\n\n```js\nvar template = '@@import template.txt';\nvar fragment = '@@import src/fragments/fragment.html';\nvar jsonConfig = '@@import config.json';\n```\n\n...and Gulp task:\n\n```js\nvar gulp = require('gulp');\nvar inject = require('gulp-js-text-inject');\n\ngulp.task('js', function() {\n    return gulp.src('path/to/your/js/*.js')\n        .pipe(inject({\n            basepath: 'path/to/your/templates/'\n        }))\n        .pipe(gulp.dest('path/for/output'));\n});\n```\n\nIf we use this plugin, the resulting JS will be:\n\n```js\nvar template = 'Hello World!\\n\\nHow are you!';\nvar fragment = '<div>\\n   <p>Hello World!</p>\\n   <p>How are you!</p>\\n</div>';\nvar template = '{\\n   \"config\": true,\\n   \"moreConfig\": false\\n}';\n```\n\n## Changing the import pattern\n\n```js\nvar myLog = Loader.load('myLog.log');\n```\n\nConfig to match `Loader.load`:\n\n```js\nvar gulp = require('gulp');\nvar inject = require('gulp-js-html-inject');\n\ngulp.task('js', function() {\n    return gulp.src('path/to/your/js/*.js')\n        .pipe(inject({\n            basepath: 'path/to/your/js/',\n            pattern: /Loader.load\\(['\"]([a-zA-Z0-9\\-_.\\\\/]+)['\"]\\)/g\n        }))\n        .pipe(gulp.dest('path/for/output'));\n});\n```\n\n## Options\n\nOption | Type | Default | Details\n------ | ---- | ------- | -------\nbasepath | string | `\"\"` | Base path to look up referenced templates from\npattern | RegExp | `/'@@import ([a-zA-Z0-9\\-_.\\\\/]+)'/g` | Pattern to match template references. Should have one capture group that will match template path\nrelative | boolean | `false` | Resolve templates relative to the file being processed\ndebug | boolean | `false` | Displays some information while working - processed files, found references, injection result\n","readmeFilename":"README.md"}