{"_id":"@aceforth/nuxt-netlify","_rev":"2-2a84b5dc44d3e9b1cca62f18deaf7e0f","name":"@aceforth/nuxt-netlify","dist-tags":{"latest":"1.1.0"},"versions":{"1.0.0":{"name":"@aceforth/nuxt-netlify","version":"1.0.0","description":"Dynamically generate _headers and _redirects files for Netlify in your Nuxt.js projects.","main":"lib/index.js","directories":{"example":"example"},"scripts":{"test":"yarn lint && jest","lint":"eslint --ext .js lib test","changelog":"conventional-changelog -p angular -r 2 -i CHANGELOG.md -s"},"repository":{"type":"git","url":"git+https://github.com/aceforth/nuxt-netlify.git"},"author":{"name":"Aceforth","email":"opensource@aceforth.com"},"license":"MIT","bugs":{"url":"https://github.com/aceforth/nuxt-netlify/issues"},"homepage":"https://aceforth.com/docs/nuxt-netlify/?utm_source=npm&utm_medium=readme&utm_campaign=nuxt-netlify","dependencies":{"consola":"^2.11.3","fs-extra":"^9.0.0","lodash.template":"^4.5.0"},"devDependencies":{"@commitlint/cli":"8.3.5","@commitlint/config-conventional":"8.3.4","conventional-changelog-cli":"2.0.31","eslint":"6.8.0","eslint-config-dev":"2.0.0","eslint-config-standard":"14.1.1","eslint-plugin-import":"2.20.2","eslint-plugin-jest":"23.8.2","eslint-plugin-node":"11.1.0","eslint-plugin-promise":"4.2.1","eslint-plugin-standard":"4.0.1","eslint-plugin-vue":"6.2.2","husky":"4.2.3","immutable":"4.0.0-rc.12","jest":"25.2.4","sharp":"0.25.2","upath":"1.2.0"},"husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS","precommit":"lint-staged"}},"jest":{"testEnvironment":"node","coverageDirectory":"./coverage/","collectCoverage":true},"engines":{"node":">=10"},"gitHead":"2a0672f54cfa3e0b90b5a20400691206e3f9704f","_id":"@aceforth/nuxt-netlify@1.0.0","_nodeVersion":"12.16.1","_npmVersion":"6.13.4","dist":{"integrity":"sha512-vjgSoKF+PdpvZ+SVhgxSNJD3VW5tSe69B9n3MSMH5xIEwWwiubL61TWdr9K3Wm4nei6gR/fdnekWf3nBe2Zy7Q==","shasum":"d18baaf9378f131361e689866503f5f1367c7cbb","tarball":"https://registry.npmjs.org/@aceforth/nuxt-netlify/-/nuxt-netlify-1.0.0.tgz","fileCount":17,"unpackedSize":19325,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJek1BVCRA9TVsSAnZWagAAcVsP/iKM/k/rzeZZ4v98icmH\nlnpD/okA82ZpX0ELoWFpwzWpWUwficmFaWaaejamj9jIj1sxCkdwqr4bgm2e\nGf/YvbzuZ4qhc84RW2aljID/MHNIQ176KNiGL63HqQ5VpJnYoaIErsRyd3k3\nzjhoJkq3sKtUo7PmkgGPzf2WxHtzQFZ3/AF4xc2rDuSuKEVQCP+n6mbn7HaW\nFIWRcJu2dxckSwgyQO7WB+aLd47wPNgJjffSKoswVYu0zy6qgiT9GFZzRBgn\nhOVtLppHRks8UmXrbs9l4lIvfAyfVKMd+nGaQiQK58LhNhe2dXAT/4cLc8S2\nGuWuKHpvHR5mWAVEHveJ5RmwG0lqLGLqDzLHa9dkiVPtbxzlLQyWlkMqP1qI\nbjdy7QwaYZ2Pnd0J7RCbiHllQRA40QNRv+yA/SQh4If16scMx6fdIQAHbugM\nk5u2rSOkFmCjjEFRkSlPk2xzUED6jmVJ2US/L6uQq/F1oh3aQ5OtsL2ipMgX\npv/eeG/GLUsxy+rQward6x0ruo4mo85Zvjh5O9CmD/PWOpIG+7rnd2idMVft\n+y78KHSHOw7spEJ3ZLqiCnGv77aPu6Q+naZFgUrCZ7tOpKlvnWmAwYXqaKuS\nPmT2Dms/Z6nsub2L+zMqktItINY5mTNcHY8y3cWZBISlTPXQBdtbx5YhbPTy\n/JPN\r\n=nwkJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAiwKe0Ml2NiiYgR94ECG2W8JWz7QpvZNHQEIMBvTVfAAiAVleXnH4LuCtBeocKIH2YHnUJ68g43FjtK9wyiqfIXng=="}]},"maintainers":[{"name":"bazzitetech","email":"contact@bazzite.com"},{"name":"juliomrqz","email":"julio@marquez.co"}],"_npmUser":{"name":"bazzitetech","email":"contact@bazzite.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nuxt-netlify_1.0.0_1586712661018_0.5719823761327669"},"_hasShrinkwrap":false},"1.1.0":{"name":"@aceforth/nuxt-netlify","version":"1.1.0","description":"Dynamically generate _headers and _redirects files for Netlify in your Nuxt.js projects.","main":"lib/index.js","directories":{"example":"example"},"scripts":{"test":"yarn lint && jest","lint":"eslint --ext .js lib test","changelog":"conventional-changelog -p angular -r 2 -i CHANGELOG.md -s"},"repository":{"type":"git","url":"git+https://github.com/juliomrqz/nuxt-netlify.git"},"author":{"name":"Julio Marquez","email":"opensource@marquez.co"},"license":"MIT","bugs":{"url":"https://github.com/juliomrqz/nuxt-netlify/issues"},"homepage":"https://marquez.co/docs/nuxt-netlify/?utm_source=npm&utm_medium=readme&utm_campaign=nuxt-netlify","dependencies":{"consola":"^2.14.0","fs-extra":"^9.0.1","lodash.template":"^4.5.0"},"devDependencies":{"@commitlint/cli":"9.1.1","@commitlint/config-conventional":"9.1.1","conventional-changelog-cli":"2.0.34","eslint":"7.5.0","eslint-config-dev":"2.0.0","eslint-config-standard":"14.1.1","eslint-plugin-import":"2.22.0","eslint-plugin-jest":"23.18.0","eslint-plugin-node":"11.1.0","eslint-plugin-promise":"4.2.1","eslint-plugin-standard":"4.0.1","eslint-plugin-vue":"6.2.2","husky":"4.2.5","immutable":"4.0.0-rc.12","jest":"26.1.0","sharp":"0.25.4","upath":"1.2.0"},"husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS","precommit":"lint-staged"}},"jest":{"testEnvironment":"node","coverageDirectory":"./coverage/","collectCoverage":true},"engines":{"node":">=10"},"gitHead":"0fe0ba3639d4d7eee14904772d56169a363399e9","_id":"@aceforth/nuxt-netlify@1.1.0","_nodeVersion":"12.18.1","_npmVersion":"6.14.5","dist":{"integrity":"sha512-dppObGjvr1IRuE70aAvXfNtxZjbHpBCu17Lr54rggbYT/k1n5qh3yqQQ1pkJzH/gRlcKNqqxGYiNtLTP2gJraQ==","shasum":"ad45117532a17477f8134473ca6dd179df2d20bf","tarball":"https://registry.npmjs.org/@aceforth/nuxt-netlify/-/nuxt-netlify-1.1.0.tgz","fileCount":17,"unpackedSize":19260,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfFH9TCRA9TVsSAnZWagAA63AQAJ0Ueio5o4JBG8n2NTG0\nzTOrDySUuYy4Fc5jPHCoiRfAJd6Qa1UtbkMpLGmP01OhJF5niO183QxJ2mLY\n0N9o97QwdG242A65VLUvmVeGRCzqDyeLld7g/QaKBEqEHQCcR7fvcTsV4odl\nRNMWGCWhyHGX92ega6wAwsC1tSvhPiYZU8QLjvMaTlHHfHWxZEa/lj/oHoiZ\nJor7K/CJ6h5GSmcoddFTGAV9GEzyCxdNbDr3ytFG141grzy/2ezp4e5idjoh\nfzMArJHV31TRuMEubHV4/OONLJxKUvsGfSB2FAHa31J4JJPl0uBNH3+Gfa0q\nLqKcGldTTJXD1fjd1p8IyN2qnEZnMnxy/4AP9XNnfCmpKLXms2gIEnZdairC\nhKKmjtQWRQyyl7VBXAF1BeTWiLDRxRPpacz0eC/aul9cKvbQOzrlEOZIgGat\nWauBeiYfMkKj8gR3ssGua591LudQ+RlWnp8g2bA2XVa/jyBHvqJuCYeFUssJ\n19HYEAs4oTkmJHIrVXLhFdng2d3TFJOuoacgcXFwjqUzzvCXryNT22rCFez5\nduu1b7pBeMVfyn/nRor0Vdol7VChdxu9HREh9GfI93zD3tZ6bmceBayEeJId\n0S7GeXgRJSHUsqGcJVDZMMXs/thNr5N+IQYgW3/PWS21Ih5vpLg+RgVyChP0\nt0n5\r\n=sR0e\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEcw7rVTOoaNNRJPA0jB9d6gm2H/7WzI7KTD4PpIOu8wAiAnEwtfWBDu4EZoASFaMuQrvd/XR+JqTrk8nz45lCtHqg=="}]},"maintainers":[{"name":"bazzitetech","email":"contact@bazzite.com"},{"name":"juliomrqz","email":"julio@marquez.co"}],"_npmUser":{"name":"bazzitetech","email":"contact@bazzite.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nuxt-netlify_1.1.0_1595178834658_0.8312755101447602"},"_hasShrinkwrap":false}},"time":{"created":"2020-04-12T17:31:00.751Z","1.0.0":"2020-04-12T17:31:01.182Z","modified":"2022-04-04T11:10:24.814Z","1.1.0":"2020-07-19T17:13:54.778Z"},"maintainers":[{"name":"bazzitetech","email":"contact@bazzite.com"},{"name":"juliomrqz","email":"julio@marquez.co"}],"description":"Dynamically generate _headers and _redirects files for Netlify in your Nuxt.js projects.","homepage":"https://marquez.co/docs/nuxt-netlify/?utm_source=npm&utm_medium=readme&utm_campaign=nuxt-netlify","repository":{"type":"git","url":"git+https://github.com/juliomrqz/nuxt-netlify.git"},"author":{"name":"Julio Marquez","email":"opensource@marquez.co"},"bugs":{"url":"https://github.com/juliomrqz/nuxt-netlify/issues"},"license":"MIT","readme":"[![Codacy Badge](https://api.codacy.com/project/badge/Grade/a55402d7c89b4084882c3362427132d8)](https://www.codacy.com/app/juliomrqz/nuxt-netlify?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=juliomrqz/nuxt-netlify&amp;utm_campaign=Badge_Grade)\n[![Travis](https://img.shields.io/travis/juliomrqz/nuxt-netlify.svg)](https://travis-ci.org/juliomrqz/nuxt-netlify)\n[![David](https://img.shields.io/david/peer/juliomrqz/nuxt-netlify.svg)](https://david-dm.org/juliomrqz/nuxt-netlify?type=peer)\n[![David](https://img.shields.io/david/dev/juliomrqz/nuxt-netlify.svg)](https://david-dm.org/juliomrqz/nuxt-netlify?type=dev)\n[![version](https://img.shields.io/npm/v/@aceforth/nuxt-netlify.svg)](https://www.npmjs.com/package/@aceforth/nuxt-netlify)\n[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/juliomrqz/nuxt-netlify/develop/LICENSE)\n\n# Nuxt Netlify\n\nDynamically generate `_headers` and `_redirects` files for Netlify in your Nuxt.js projects.\n\nThis module supports the creation of [**redirects**][netlify-redirects] and [**header**][netlify-headers-and-basic-auth] rules for your Netlify site: you can easily configure custom headers, basic auth, redirect instructions and rewrite rules from your _nuxt config file_.\n\n*Read this in other languages: [English][docs], [Español][docs-es]*\n\n\n## Installation\n\n:warning: `node >= 10` and `nuxt >= 2` are required.\n\n\n```bash \nnpm install --save-dev @aceforth/nuxt-netlify\n```\n\nor\n\n```bash \nyarn add --dev @aceforth/nuxt-netlify\n```\n\nAdd `@aceforth/nuxt-netlify` to the `buildModules` section of `nuxt.config.js`:\n\n:warning: If you are using Nuxt `< 2.9.0`, use `modules` instead. \n\n```js\n{\n  buildModules: [\n    '@aceforth/nuxt-netlify',\n  ],\n\n  netlify: { \n    mergeSecurityHeaders: true \n  }\n}\n```\n\nor \n\n\n```js\n{\n  buildModules: [\n    [\n      '@aceforth/nuxt-netlify',\n      {\n        mergeSecurityHeaders: true\n      }\n    ]\n  ]\n}\n```\n\n\n## Usage\n\nThe default configuration will generate an empty `_redirects` file and a `_headers` file with some caching and security headers:\n\n```text\n# _headers\n\n/*\n  Referrer-Policy: origin\n  X-Content-Type-Options: nosniff\n  X-Frame-Options: DENY\n  X-XSS-Protection: 1; mode=block\n\n/_nuxt/*\n  Cache-Control: public, max-age=31536000, immutable\n\n/sw.js\n  Cache-Control: no-cache\n```\n\n> :warning: the `/_nuxt/*` reference automatically changes with the value of [`build.publicPath`][nuxt-docs-build-publicPath].\n\n### Headers\n\nThe headers object represents a JS version of the [Netlify `_headers` file format][netlify-headers-and-basic-auth]. You should pass in a object with string keys (representing the paths) and an array of strings for each header. For example:\n\n\nYou can add extra headers as follows:\n\n```js\nconst pkg = require('./package.json')\n\n{\n  netlify: { \n    headers: {\n      '/*': [\n        'Access-Control-Allow-Origin: *',\n        `X-Build: ${pkg.version}`\n      ],\n      '/favicon.ico': [\n        'Cache-Control: public, max-age=86400'\n      ]\n    }\n  }\n}\n```\n\nthat will generate:\n\n```text\n# _headers\n\n/*\n  Referrer-Policy: origin\n  X-Content-Type-Options: nosniff\n  X-Frame-Options: DENY\n  X-XSS-Protection: 1; mode=block\n  Access-Control-Allow-Origin: *\n  X-Build: 1.0.1\n\n/_nuxt/*\n  Cache-Control: public, max-age=31536000, immutable\n\n/sw.js\n  Cache-Control: no-cache\n  \n/favicon.ico\n  Cache-Control: public, max-age=86400\n```\n\n### Redirects\n\nYou can also add [redirects][netlify-redirects], as many as you like. You should pass in an array of objects with the redirection attributes. For example:\n\n\n```js\n{\n  netlify: { \n    redirects: [\n      {\n        from: '/home',\n        to: '/'\n      },\n      {\n        from: '/my-redirect',\n        to: '/',\n        status: 302,\n        force: true\n      },\n      {\n        from: '/en/*',\n        to: '/en/404.html',\n        status: 404\n      },\n      {\n        from: '/*',\n        to: '/index.html',\n        status: 200\n      },\n      {\n        from: '/store',\n        to: '/blog/:id',\n        query: {\n          id: ':id'\n        }\n      },\n      {\n        from: '/',\n        to: '/china',\n        status: 302,\n        conditions: {\n          Country: 'cn,hk,tw'\n        }\n      }\n    ]\n  }\n}\n```\n\nwill generate:\n\n```text\n# _redirects\n\n/home               /               301\n/my-redirect        /               302!\n/en/*               /en/404.html    404\n/*                  /index.html     200\n/store    id=:id    /blog/:id       301\n/                   /china          302    Country=cn,hk,tw\n```\n\n\nSee the [configuration][docs-configuration] section for all available options.\n\n## Documentation & Support\n\n- 📄 If you want extra details of how to configure and use this project, the **full documentation** is available at [https://marquez.co/docs/nuxt-netlify/][docs].\n- 🐞 For **Bug reports** or **Feature requests**, use the [Issues section][issues].\n- 💬 For **questions**, you can also use the [Issues section][issues].\n- 🚀 You may also want to **follow me** [on Twitter][twitter].\n\n## Professional Support\n\nThis project is sponsored by me, a Full Stack Developer. If you require Professional Assistance on your project(s), please contact me at [https://marquez.co][contact-page].\n\n## Code of Conduct\n\nEveryone participating in this project is expected to agree to abide by the [Code of Conduct][code-of-conduct].\n\n\n## License\n\nCode released under the [MIT License][license-page].\n\n\n![](https://ga-beacon.appspot.com/UA-65885578-17/juliomrqz/nuxt-netlify?pixel)\n\n[docs]: https://marquez.co/docs/nuxt-netlify/?utm_source=github&utm_medium=readme&utm_campaign=nuxt-netlify\n[docs-es]: https://marquez.co/es/docs/nuxt-netlify/?utm_source=github&utm_medium=readme&utm_campaign=nuxt-netlify\n[docs-configuration]: https://marquez.co/docs/nuxt-netlify/configuration/?utm_source=github&utm_medium=readme&utm_campaign=nuxt-netlify\n[nuxt-docs-build-publicPath]: https://nuxtjs.org/api/configuration-build#publicPath\n[netlify-headers-and-basic-auth]: https://www.netlify.com/docs/headers-and-basic-auth/\n[netlify-redirects]: https://www.netlify.com/docs/redirects/\n[issues]: https://github.com/juliomrqz/nuxt-netlify/issues\n[twitter]: https://twitter.com/juliomrqz\n[contact-page]: https://marquez.co?utm_source=github&utm_medium=readme&utm_campaign=nuxt-netlify\n[code-of-conduct]: https://www.contributor-covenant.org/version/2/0/code_of_conduct/\n[license-page]: https://github.com/juliomrqz/nuxt-netlify/blob/develop/LICENSE\n","readmeFilename":"README.md"}