{"_id":"babel-plugin-require-context-hook","_rev":"1-24852d74d393830bc108f0d284cd13e1","name":"babel-plugin-require-context-hook","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"babel-plugin-require-context-hook","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","devDependencies":{"babel-core":"^6.26.3","babel-register":"^6.26.0"},"gitHead":"955fb22c63f5518196328b4d87ce14176119dc30","homepage":"https://github.com/smrq/babel-plugin-require-context-hook#readme","_id":"babel-plugin-require-context-hook@1.0.0","_npmVersion":"5.5.1","_nodeVersion":"8.9.1","_npmUser":{"name":"smrq","email":"smr.kyu@gmail.com"},"dist":{"integrity":"sha512-EMZD1563QUqLhzrqcThk759RhuNVX/ZJdrtGK6drwzgvnR+ARjWyXIHPbu+tUNaMGtPz/gQeAM2M6VUw2UiUeA==","shasum":"3f0e7cce87c338f53639b948632fd4e73834632d","tarball":"https://registry.npmjs.org/babel-plugin-require-context-hook/-/babel-plugin-require-context-hook-1.0.0.tgz","fileCount":9,"unpackedSize":3433,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbGB6bCRA9TVsSAnZWagAAqzQP/idc92sUz+7w4SWdE4dI\nKswyEYtoU/yEbJGNQNs9B+eYCSfQ4SbHVgTYV7t7as6gr8Xtu0j4+YIdfIdT\nn4d1O/rREt2bX7Ow3e5rLMJrBRWqiCI7/fezm7JEXfiPFGcipHUahW2DV1w6\nwr3hIIvEk8aa6Pjh1My0VHwPfyZ4usRrW2mTWtBvWjjsrloAMGqcOXE93Z0E\nJhQPKyY/6W/bQpN1MVwBzPgKmLCZ/fS+0NqveHBNtkDYjIUytXLmObI89UEm\nNOEgXaOUj9T/yM7MAI485KB8jUu1qwweTIB8Z1tX9dVXYGzClbNYzDZnbKc+\nGIZWQtW6K9d+ke4Moo7wVog9s3NzxMtAeCW0gkNrty+8Mz2n3tBrN0TB8ZSJ\nW9YzxQN9PHQW91HK9z1KZlyPiPvpbJOuUNsqCOLGOMuJ5mrrG51VdWg/5M9n\nu9pQj0NJW3zTrA4BgfEREiZlhKRLTGHLgwFXsSabAPubRS2jkPS5VDwgB1ma\njdCbtrOc3WEfFJCk0yHlJdiUbWDj9AtqESTH8uEcaqrTUzPfk3IiVpRCd/ui\n/SCerkFUpzbzKdO+aJZE76sH6qQ9r/+WX8b6HTcvqbPKqZaB1uxHw5gXZsEr\nUttouvya4czxp5Cf/CL/j0RSqgsy/3f5AwjOD2nKmjlrkzmzrS5L1wsbSAZ5\nCKns\r\n=uNZj\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICpp9btXR4F0nVZ/LUx2/sp+FD2e6WR0Xp+K8/WgMXm0AiEA+9KseNBG7qAR9Ym/S8beVE4+4bwzGhcmJPPKDRtz+KY="}]},"maintainers":[{"name":"smrq","email":"smr.kyu@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/babel-plugin-require-context-hook_1.0.0_1528307354697_0.7152042650665"},"_hasShrinkwrap":false}},"time":{"created":"2018-06-06T17:49:14.696Z","1.0.0":"2018-06-06T17:49:14.786Z","modified":"2022-04-11T16:42:14.830Z"},"maintainers":[{"name":"smrq","email":"smr.kyu@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"}