{"_id":"@cubi/fileloader","_rev":"1-16c157a33cb8986b69105964fdcaf9b5","name":"@cubi/fileloader","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@cubi/fileloader","version":"1.0.0","description":"The common file-loader module for cubi framework","main":"dist/index.js","scripts":{"test":"jest","build":"tsc"},"repository":{"type":"git","url":"git+https://github.com/suntopo/cube-fileloader.git"},"keywords":["file","loader","fileloader"],"author":{"name":"SUNTOPO"},"license":"ISC","dependencies":{"globby":"^8.0.1"},"devDependencies":{"@types/globby":"^8.0.0","@types/jest":"^24.0.11","jest":"^24.5.0","ts-jest":"^24.0.0","typescript":"^3.3.3333"},"gitHead":"6a7616819ccada482da99256108b20acb84b703a","bugs":{"url":"https://github.com/suntopo/cube-fileloader/issues"},"homepage":"https://github.com/suntopo/cube-fileloader#readme","_id":"@cubi/fileloader@1.0.0","_npmVersion":"6.4.0","_nodeVersion":"8.9.0","_npmUser":{"name":"suntopo","email":"suntopo@163.com"},"dist":{"integrity":"sha512-7nRa0ba8dRjiRvQ+BxhK2GGFi6R6Sz1qko8yoZxtGH3uAEN0eCWwOhoQt5vt10EiXt8vOAay1V13B3kSNctHRA==","shasum":"fd765b491e69e4ac942ce7631d06ecc030da31bc","tarball":"https://registry.npmjs.org/@cubi/fileloader/-/fileloader-1.0.0.tgz","fileCount":10,"unpackedSize":8728,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJckMGWCRA9TVsSAnZWagAAHrMP/3Pv0saJlmlUc0pYG9q2\nOSBIPxi8xRW5mTF1a3zU81vjNWxe1pH66nxIVFM1Bhhx0j5XiKPKshiQR1Vl\nzmPhLbWHgSulVNO3fK80hkwTitOnfUJegWyKojcSWWqIazAJbE7Dj4bqCuPi\nHqwRvzPViln770LiUl/BLrXteo2rZc60F/vOHJJGmFcHPOxAFP3z+ptctTLt\n38TVWX9yZaGikWMB0n5vN9L01b+7zBzBXLenEBj8tzW6XydpvdPlQBvaaQB8\nw4Ira653gu3VH1His4QlKeAt7FzD6p3nMqidgCCl12jOBbqqHs+sPdE5vTWQ\npt63AblL7ktjezPKKTJRg2k2p05jLLCnq3072NSYdNwwpiXToHhRE0i3aRXR\n0zNUHQI+99uhjxmUWmBU1v5G+PLz2Tz/M/FMslI751k82v5ukU9Zd0ihUDip\n1mnIS27ZISlM/AH3VAcU5hUXXN3gAT+mbbEDzNwBa4CgqVtOKz6l147o5zN3\nxtyKYInQynhBLA0tydLWUDfJ6BcuEwwwFhuPob9BiPyzq2OoS5bpPC+s4aAt\nhVFmrkqlzn+9eDTOLRtChbS6i5Wn2rCXfD4cg131HRzBg/rUwlQVAL9pD/dT\nBontllo8PmIsSwFbEZbvcLOKSG+WjCCJpraeFJvopP04if3ljoevMYmqAgOb\n8rmx\r\n=Mx0v\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDI3DB8Loyj1h2DR/yBsYgixjblX1/e1J1aHB7Ald/9yAIhANH9OPR4hKFzlRKESa9DmaU9T7JdZXHVxVtu0AOqzPPs"}]},"maintainers":[{"name":"suntopo","email":"suntopo@163.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/fileloader_1.0.0_1552990613738_0.5695069178289069"},"_hasShrinkwrap":false}},"time":{"created":"2019-03-19T10:16:53.556Z","1.0.0":"2019-03-19T10:16:53.866Z","modified":"2022-04-05T02:10:00.011Z"},"maintainers":[{"name":"suntopo","email":"suntopo@163.com"}],"description":"The common file-loader module for cubi framework","homepage":"https://github.com/suntopo/cube-fileloader#readme","keywords":["file","loader","fileloader"],"repository":{"type":"git","url":"git+https://github.com/suntopo/cube-fileloader.git"},"author":{"name":"SUNTOPO"},"bugs":{"url":"https://github.com/suntopo/cube-fileloader/issues"},"license":"ISC","readme":"# FILELOADER\n\n## description\nauto load files or node`s modules for specify filePath.\n\n## install\n```javascript\nnpm install @cubi/fileloader\n```\n\n## use\n\n```javascript\nimport { FileLoader } from '@cubi/fileloader';\nconst fileLoader = new FileLoader(__dirname, __filename, async data => {\n  const { default as router } = data;\n  // 注册路由\n  app.use(router.routes()).use(router.allowedMethods());\n});\n\nasync fileLoader.load();\n```\n\nOR\n\n```javascript\nimport { FileLoader } from '@cubi/fileloader';\nconst fileLoader = new FileLoader(__dirname, __filename);\n\nasync fileLoader.forEach(async (data) => {\n  const { default as router } = data;\n  // 注册路由\n  app.use(router.routes()).use(router.allowedMethods());\n});\n```","readmeFilename":"README.md"}