{"_id":"babel-file-loader","_rev":"3942587","name":"babel-file-loader","description":"Load files into memory to be parsed & traversed using Babylon/Babel","dist-tags":{"latest":"2.0.0"},"maintainers":[{"name":"thejameskyle","email":"me@thejameskyle.com"}],"time":{"modified":"2025-09-01T01:32:16.000Z","created":"2017-05-25T12:47:12.100Z","2.0.0":"2018-08-13T23:28:36.628Z","1.0.3":"2017-08-08T00:26:24.171Z","1.0.2":"2017-05-29T23:38:49.260Z","1.0.1":"2017-05-27T02:57:41.654Z","1.0.0":"2017-05-25T12:47:12.100Z"},"users":{},"author":{"name":"James Kyle","email":"me@thejameskyle.com"},"repository":{"type":"git","url":"git+https://github.com/thejameskyle/babel-multi-file.git"},"versions":{"2.0.0":{"name":"babel-file-loader","version":"2.0.0","description":"Load files into memory to be parsed & traversed using Babylon/Babel","main":"index.js","repository":{"type":"git","url":"git+https://github.com/thejameskyle/babel-multi-file.git"},"author":{"name":"James Kyle","email":"me@thejameskyle.com"},"license":"MIT","files":[],"scripts":{"test":"jest"},"dependencies":{"babel-errors":"^1.0.1","babel-file":"^3.0.0","babel-plugin-tester":"^3.0.0","babel-types":"^6.24.1","read-file-async":"^1.0.0","resolve":"^1.3.3","resolve-async":"^1.0.1"},"devDependencies":{"flow-bin":"^0.46.0","jest":"^20.0.4"},"gitHead":"8b7ea92c1346875139db43126133ed676c12abdf","bugs":{"url":"https://github.com/thejameskyle/babel-multi-file/issues"},"homepage":"https://github.com/thejameskyle/babel-multi-file#readme","_id":"babel-file-loader@2.0.0","_npmVersion":"6.1.0","_nodeVersion":"10.7.0","_npmUser":{"name":"thejameskyle","email":"me@thejameskyle.com"},"dist":{"shasum":"5c38d51d1baf1e5a0c896bbf551cd083ef194a6d","size":2204,"noattachment":false,"key":"/babel-file-loader/-/babel-file-loader-2.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/babel-file-loader/download/babel-file-loader-2.0.0.tgz"},"maintainers":[{"name":"thejameskyle","email":"me@thejameskyle.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/babel-file-loader_2.0.0_1534202916567_0.6869691599425882"},"_hasShrinkwrap":false,"publish_time":1534202916628,"_cnpm_publish_time":1534202916628,"_cnpmcore_publish_time":"2021-12-16T16:27:36.794Z"},"1.0.3":{"name":"babel-file-loader","version":"1.0.3","description":"Load files into memory to be parsed & traversed using Babylon/Babel","main":"index.js","repository":{"type":"git","url":"git+https://github.com/thejameskyle/babel-multi-file.git"},"author":{"name":"James Kyle","email":"me@thejameskyle.com"},"license":"MIT","files":[],"scripts":{"test":"jest"},"dependencies":{"babel-errors":"^1.0.1","babel-file":"^1.0.2","babel-plugin-tester":"^3.0.0","babel-types":"^6.24.1","read-file-async":"^1.0.0","resolve":"^1.3.3","resolve-async":"^1.0.1"},"devDependencies":{"flow-bin":"^0.46.0","jest":"^20.0.4"},"gitHead":"7cbb3bca43c51a1e734d84f0521931da02dfa823","bugs":{"url":"https://github.com/thejameskyle/babel-multi-file/issues"},"homepage":"https://github.com/thejameskyle/babel-multi-file#readme","_id":"babel-file-loader@1.0.3","_shasum":"b9df875e136d6cddc9dfcb36334cd1ad58fffe7f","_from":".","_npmVersion":"3.10.8","_nodeVersion":"6.9.1","_npmUser":{"name":"thejameskyle","email":"me@thejameskyle.com"},"dist":{"shasum":"b9df875e136d6cddc9dfcb36334cd1ad58fffe7f","size":2872,"noattachment":false,"key":"/babel-file-loader/-/babel-file-loader-1.0.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/babel-file-loader/download/babel-file-loader-1.0.3.tgz"},"maintainers":[{"name":"thejameskyle","email":"me@thejameskyle.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/babel-file-loader-1.0.3.tgz_1502151984017_0.6846423735842109"},"directories":{},"publish_time":1502151984171,"_hasShrinkwrap":false,"_cnpm_publish_time":1502151984171,"_cnpmcore_publish_time":"2021-12-16T16:27:37.212Z"},"1.0.2":{"name":"babel-file-loader","version":"1.0.2","description":"Load files into memory to be parsed & traversed using Babylon/Babel","main":"index.js","repository":{"type":"git","url":"git+https://github.com/thejameskyle/babel-multi-file.git"},"author":{"name":"James Kyle","email":"me@thejameskyle.com"},"license":"MIT","files":[],"scripts":{"test":"jest"},"dependencies":{"babel-errors":"^1.0.1","babel-file":"^1.0.2","babel-plugin-tester":"^3.0.0","babel-types":"^6.24.1","jest":"^20.0.4","read-file-async":"^1.0.0","resolve":"^1.3.3","resolve-async":"^1.0.1"},"devDependencies":{"flow-bin":"^0.46.0"},"gitHead":"c6736ccf7f6c2a80fab6aa9dbd1856eed4dece65","bugs":{"url":"https://github.com/thejameskyle/babel-multi-file/issues"},"homepage":"https://github.com/thejameskyle/babel-multi-file#readme","_id":"babel-file-loader@1.0.2","_shasum":"c84e1e30ff031ee90cc843084d2dde3d0a78a3f0","_from":".","_npmVersion":"4.2.0","_nodeVersion":"7.10.0","_npmUser":{"name":"thejameskyle","email":"me@thejameskyle.com"},"dist":{"shasum":"c84e1e30ff031ee90cc843084d2dde3d0a78a3f0","size":2880,"noattachment":false,"key":"/babel-file-loader/-/babel-file-loader-1.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/babel-file-loader/download/babel-file-loader-1.0.2.tgz"},"maintainers":[{"name":"thejameskyle","email":"me@thejameskyle.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/babel-file-loader-1.0.2.tgz_1496101129150_0.47917209030129015"},"directories":{},"publish_time":1496101129260,"_hasShrinkwrap":false,"_cnpm_publish_time":1496101129260,"_cnpmcore_publish_time":"2021-12-16T16:27:37.423Z"},"1.0.1":{"name":"babel-file-loader","version":"1.0.1","description":"Load files into memory to be parsed & traversed using Babylon/Babel","main":"index.js","repository":{"type":"git","url":"git+https://github.com/thejameskyle/babel-multi-file.git"},"author":{"name":"James Kyle","email":"me@thejameskyle.com"},"license":"MIT","scripts":{"test":"jest"},"dependencies":{"babel-errors":"^1.0.1","babel-file":"^1.0.2","babel-plugin-tester":"^3.0.0","babel-types":"^6.24.1","jest":"^20.0.4","read-file-async":"^1.0.0","resolve":"^1.3.3","resolve-async":"^1.0.1"},"devDependencies":{"flow-bin":"^0.46.0"},"gitHead":"e9cb63fd5bb7db51c454d480a1d5fd3f4f61a505","bugs":{"url":"https://github.com/thejameskyle/babel-multi-file/issues"},"homepage":"https://github.com/thejameskyle/babel-multi-file#readme","_id":"babel-file-loader@1.0.1","_shasum":"3bf60520c2fa52cafb4cbd37921eacf582345390","_from":".","_npmVersion":"4.2.0","_nodeVersion":"7.10.0","_npmUser":{"name":"thejameskyle","email":"me@thejameskyle.com"},"dist":{"shasum":"3bf60520c2fa52cafb4cbd37921eacf582345390","size":23035,"noattachment":false,"key":"/babel-file-loader/-/babel-file-loader-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/babel-file-loader/download/babel-file-loader-1.0.1.tgz"},"maintainers":[{"name":"thejameskyle","email":"me@thejameskyle.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/babel-file-loader-1.0.1.tgz_1495853861564_0.12973732640966773"},"directories":{},"publish_time":1495853861654,"_hasShrinkwrap":false,"_cnpm_publish_time":1495853861654,"_cnpmcore_publish_time":"2021-12-16T16:27:37.647Z"},"1.0.0":{"name":"babel-file-loader","version":"1.0.0","description":"Load files into memory to be parsed & traversed using Babylon/Babel","main":"index.js","repository":{"type":"git","url":"git+https://github.com/thejameskyle/babel-multi-file.git"},"author":{"name":"James Kyle","email":"me@thejameskyle.com"},"license":"MIT","scripts":{"test":"jest"},"dependencies":{"babel-errors":"^1.0.1","babel-file":"^1.0.2","babel-plugin-tester":"^3.0.0","babel-types":"^6.24.1","jest":"^20.0.4","read-file-async":"^1.0.0","resolve":"^1.3.3","resolve-async":"^1.0.1"},"devDependencies":{"flow-bin":"^0.46.0"},"gitHead":"a670d4f3919695dbc7c16aa96b137ba19311d1eb","bugs":{"url":"https://github.com/thejameskyle/babel-multi-file/issues"},"homepage":"https://github.com/thejameskyle/babel-multi-file#readme","_id":"babel-file-loader@1.0.0","_shasum":"6246baaf5ed91079ff94b6ea81f288707a47ceab","_from":".","_npmVersion":"4.2.0","_nodeVersion":"7.10.0","_npmUser":{"name":"thejameskyle","email":"me@thejameskyle.com"},"dist":{"shasum":"6246baaf5ed91079ff94b6ea81f288707a47ceab","size":28282,"noattachment":false,"key":"/babel-file-loader/-/babel-file-loader-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/babel-file-loader/download/babel-file-loader-1.0.0.tgz"},"maintainers":[{"name":"thejameskyle","email":"me@thejameskyle.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/babel-file-loader-1.0.0.tgz_1495716432002_0.6215735154692084"},"directories":{},"publish_time":1495716432100,"_hasShrinkwrap":false,"_cnpm_publish_time":1495716432100,"_cnpmcore_publish_time":"2021-12-16T16:27:37.877Z"}},"readme":"# babel-file-loader\n\n> Load files into memory to be parsed & traversed using [Babylon](https://github.com/babel/babylon)/Babel\n\n```js\nimport {loadImportSync} from 'babel-file-loader';\n\nexport function plugin() {\n  return {\n    visitor: {\n      ImportDefaultDeclaration(path) {\n        let file = loadImportSync(path);\n\n        file.path.traverse({\n          ExportDefaultDeclaration() {\n            console.log('Found matching export default');\n          },\n        });\n      },\n    },\n  },\n};\n```\n\n## API\n\n#### `resolveFilePath{Async,Sync}(path, filePath, resolveOpts)`\n\nResolve a `filePath` relative to the file a `path` belongs to. Returns string.\n\n#### `resolveImportFilePath{Async,Sync}(path, resolveOpts)`\n\nResolve an import declaration `path` to extract a file path. Returns string.\n\n#### `loadFile{Async,Sync}(filePath, parserOpts)`\n\nLoad and parse a file from a `filePath`. Returns [File](https://github.com/babel-utils/babel-file).\n\n#### `loadImport{Async,Sync}(path, resolveOpts, parserOpts)`\n\nLoad and parse a file from an import declaration `path`. Returns [File](https://github.com/babel-utils/babel-file).\n","_attachments":{},"homepage":"https://github.com/thejameskyle/babel-multi-file#readme","bugs":{"url":"https://github.com/thejameskyle/babel-multi-file/issues"},"license":"MIT"}