{"_id":"babel-plugin-require-context-hook-babel7","_rev":"1-58f3cadc69d1f9cbe375b5bd17857b7d","name":"babel-plugin-require-context-hook-babel7","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"babel-plugin-require-context-hook-babel7","version":"1.0.0","description":"Babel plugin to replicate Webpack require.context","main":"index.js","scripts":{"test":"node test/run.js"},"keywords":["babel","webpack"],"author":{"name":"Greg Smith","email":"smr.kyu@gmail.com"},"repository":{"type":"git","url":"git+https://github.com/smrq/babel-plugin-require-context-hook.git"},"bugs":{"url":"https://github.com/smrq/babel-plugin-require-context-hook/issues"},"license":"MIT","peerDependencies":{"@babel/core":"^7.2.2"},"devDependencies":{"@babel/core":"^7.2.2","@babel/register":"^7.0.0"},"gitHead":"37d4ce1e7572a0ae33d32a08895e972772a61326","homepage":"https://github.com/smrq/babel-plugin-require-context-hook#readme","_id":"babel-plugin-require-context-hook-babel7@1.0.0","_npmVersion":"5.6.0","_nodeVersion":"8.11.2","_npmUser":{"name":"radswiat","email":"rad.swiat@gmail.com"},"dist":{"integrity":"sha512-kez0BAN/cQoyO1Yu1nre1bQSYZEF93Fg7VQiBHFfMWuaZTy7vJSTT4FY68FwHTYG53Nyt0A7vpSObSVxwweQeQ==","shasum":"1273d4cee7e343d0860966653759a45d727e815d","tarball":"https://registry.npmjs.org/babel-plugin-require-context-hook-babel7/-/babel-plugin-require-context-hook-babel7-1.0.0.tgz","fileCount":10,"unpackedSize":20141,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcY8w+CRA9TVsSAnZWagAAzP8P/1UWes+21FG59/Ldc4f0\nGMt7lR8T/A0z4zmys2thIsKVv4EE108ObQn0yVNefgwZx1FLza0kPoTLMgw/\n9x4OB21cG0Dhx/ulvFJM1NQNAeK7D2wVXpi9zEd1UIUSLaYkB9fBBu4hO7ej\nyCyfs1CZLqNMrGcti2ZIwKytpLVug9jTo21kuR029Cp9TT8Om8LIs9eWbKEy\nZu3wrkJakJBNtSDI5oXsBSTijmiDTzVyfzufI1+hAY62dTxoHzgBjbSHYuag\nH7vVfpvJFbnY+BNiuUV5Tai/BiBsU1d8y30DHD4eUOiW7r6nEQNzpaUmgn9X\nYV7M819qc1MAVfIgE+9scYphxDzPANE4hBac6bk4whQILEn/fvSCuoAKD84a\nItZDHRqEznbwy66bLukNKAYNhjYHuPGZlOzE9NMuGrmhPekZWo+nddeFTYEj\nS8uhDBICHMlYdEkSWFbdAOG1AO6kLzPLIPsBqmf5XYmpKz9REEDwNWlhQpig\nN4rZE9VaXECM04v6nf+AHB9jTHOTw44p5t12cXXWehGwYavVuKX5OiKGV/sx\nfr6wouP96JRXvqK8myuYvb8Uof5eh6YEfg5NrflhguASVMl0dYCNvAMRx68M\nY39qsqIgoPCPtTwHLIpLc4FcXSRgj+vQ+buVpgoXOkj+4l7+t5rkQXuVqoA4\nb1Dr\r\n=2yoj\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCBI/CYWdiEoKKsV/iLAw5Ghy0Zj33CjUFGC7uK/BjAIgIhANvKJQ0jQUQFfYyBX5+E3Dgx7lJOmMRRIpQpXbssyZqL"}]},"maintainers":[{"name":"radswiat","email":"rad.swiat@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/babel-plugin-require-context-hook-babel7_1.0.0_1550044221483_0.07758275034013584"},"_hasShrinkwrap":false}},"time":{"created":"2019-02-13T07:50:21.483Z","1.0.0":"2019-02-13T07:50:21.635Z","modified":"2022-04-11T16:42:15.119Z"},"maintainers":[{"name":"radswiat","email":"rad.swiat@gmail.com"}],"description":"Babel plugin to replicate Webpack require.context","homepage":"https://github.com/smrq/babel-plugin-require-context-hook#readme","keywords":["babel","webpack"],"repository":{"type":"git","url":"git+https://github.com/smrq/babel-plugin-require-context-hook.git"},"author":{"name":"Greg Smith","email":"smr.kyu@gmail.com"},"bugs":{"url":"https://github.com/smrq/babel-plugin-require-context-hook/issues"},"license":"MIT","readme":"# babel-plugin-require-context-hook\n\n## Usage\n\nbabelrc:\n\n```\n\"plugins\": [\n\t\"require-context-hook\"\n]\n```\n\nWherever you configure babel-register (your source file, a register script, etc):\n\n```\nrequire('babel-plugin-require-context-hook/register')();\n```\n\n## How it works\n\nThe register script `babel-plugin-require-context-hook/register` implements the function `require.context` with an extra parameter-- the directory in which the calling file resides-- and places that function on the global scope.\n\nThe Babel plugin `babel-plugin-require-context-hook` rewrites all calls to `require.context` into calls to this global function, passing in `__dirname` as the extra parameter.\n","readmeFilename":"README.md"}