{"_id":"@cretezy/next-routes-now","_rev":"1-2b54326eadd47123c70a96c23ee28280","name":"@cretezy/next-routes-now","dist-tags":{"latest":"2.1.0"},"versions":{"2.1.0":{"name":"@cretezy/next-routes-now","version":"2.1.0","description":"CLI tool to generate next-routes for Now 2.0","license":"MIT","main":"lib/index.js","bin":{"generate-now-routes":"bin/generate-now-routes"},"devDependencies":{"next":"^8.1.0","next-routes":"^1.4.2","react":"^16.8.6"},"engines":{"node":">=8.0.0"},"dependencies":{"minimist":"^1.2.0"},"gitHead":"6ce3a590926e406d36c8e3e42278fbf1cf7af6a7","_id":"@cretezy/next-routes-now@2.1.0","_nodeVersion":"11.10.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-9PJ0WpKhlmx5a7mrhDqJrJx18DchBV2d2mHgw2d9Io28TBu6je6AS4DqKSoLXWdmh5h3c8dRAoOobHTQc6sUrQ==","shasum":"9a3d8d5e7b36e4b829d9c05f26ee2da5b55bfef6","tarball":"https://registry.npmjs.org/@cretezy/next-routes-now/-/next-routes-now-2.1.0.tgz","fileCount":5,"unpackedSize":6206,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdBbwLCRA9TVsSAnZWagAAeVQP/Re1avJphtQ2+WehabX5\nK3tQ37jv49bGpENchYO4N5HWgLEjGPPhWqWehZBgiKsriB4PBHgnImZupEvd\nfjsNl5guci3g4jrU/Rz0bLNsT4IMW/BCc0z1jYPU942wFD7eWZPpzAd9uz4Q\n21fSVyoGgJvARcN0O2t8i0jCOavUhYv4QZGw0PYDgjxKFXnY6gRrBSuGUN9z\ne5xJs0bVvZXB6wnVzASSHbEaTjmcZRKyLQd9xg4WXT9TRpYBii8gLEOp8F2N\ngCKSOPtrQ9HjCllMpFmcZey64tmnm6DUoRrZ26YGkcQcCI47el4uqokwsYRu\nTydXFji09X4NN6sjiyFRO3bJP/CSY5sHZ5LUfY36FjLxNYNcSw5ORP96Ju18\nZ0Iz4wrsV/7B5N/0clRumlHn7zU1ueSlGH5ScKQTRkU2f3jISCfZKlWelqwS\nuhRvddvSpX2SXtTo7bHgHOdIWTlmjvlZvNtd0xjov9yGA/Q9rEGwxvwHKZEy\n7s1cxBHuh35OwlAJmkjaO6lJUDdzH+NFTaJDiontLdTmZUwOIfI2Z0qh86P/\nsQqfGQnwz10auKYE87Zcs+wIDAAaw8XBMd1J+YTAQE42i7k0t1fSMFz0DzND\ns9I9VLQQZkW5/33jn4BvkUcGtXQx2Yicq50Z5kxRmKETn3zixJak8Pz8JujP\nuz2i\r\n=BFZ7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC3M9/H0WLXLL0kfxwY/s2PN5AcZdrnlS7xGUtx2g8JwQIgS3eYA6f1E73lXeu8wlrqJdeoI6umu4m9mCHSXoz2QYQ="}]},"maintainers":[{"name":"cretezy","email":"charles@cretezy.com"}],"_npmUser":{"name":"cretezy","email":"charles@cretezy.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/next-routes-now_2.1.0_1560656907114_0.08352090997695427"},"_hasShrinkwrap":false}},"time":{"created":"2019-06-16T03:48:27.084Z","2.1.0":"2019-06-16T03:48:27.305Z","modified":"2022-04-05T01:47:54.562Z"},"maintainers":[{"name":"cretezy","email":"charles@cretezy.com"}],"description":"CLI tool to generate next-routes for Now 2.0","license":"MIT","readme":"## Usage\n\nTo install the latest version of Next Routes for Now CLI, run this command:\n\n```bash\nnpm install -g next-routes-now\n# or\nyarn global add next-routes-now\n```\n\nOr install locally:\n```bash\nnpm install next-routes-now\n# or\nyarn add next-routes-now\n```\n\n## Generate routes\n\n```\ngenerate-now-routes <routes.json> [-A <now.json>]\n```\n\n### Usage\n\n```\nDescription\n\nUsage\n  $ generate-now-routes <routes_file> [options]\n\nOptions\n  --help, -h          Display this message\n  --version, -v       Display version\n  --local-config, -A  Path to the local `now.json` file\n```\n\n### Routes config json example\n\nDefine your Now 2 rules in routes.json. To build your next-routes use the `build`\nkey to compose your next-routes into your now.json.\n\n```json\n[\n  {\n    \"src\": \"/_next/static/(.*)\",\n    \"dest\": \"/_next/static/$1\",\n    \"headers\": { \"cache-control\": \"s-maxage=86400\" },\n    \"continue\": true\n  },\n  {\n    \"build\": \"routes.js\"\n  }\n]\n```\n\n### Can also be used programatically\n\n```\nconst generate = require(\"next-routes-now\")\n\ngenaret.buildAndUpdate(pathToRoutes, pathToNow);\n```\n\n### With prefix\n\nIf you files are not located at the root of your project, say in a monorepo, you can use the `prefix` key:\n\n```json\n[\n  {\n    \"build\": \"routes.js\",\n    \"prefix\": \"/packages/web\"\n  }\n]\n```\n","readmeFilename":"README.md"}