{"_id":"@coopertweak/gatsby5-plugin-runtime-path-prefix","name":"@coopertweak/gatsby5-plugin-runtime-path-prefix","dist-tags":{"latest":"2.0.1"},"versions":{"2.0.1":{"name":"@coopertweak/gatsby5-plugin-runtime-path-prefix","description":"Adds support for deploying Gatsby to Swarm/IPFS by ensuring that assets are relative","version":"2.0.1","keywords":["gatsby","gatsby-plugin","swarm","ens","ipfs","ipns","relative","prefix","basename"],"author":{"name":"Mattia Dalzocchio","email":"mattiadalzocchio@me.com"},"homepage":"https://github.com/mattiaz9/gatsby-plugin-runtime-path-prefix","repository":{"type":"git","url":"git+ssh://git@github.com/mattiaz9/gatsby-plugin-runtime-path-prefix.git"},"license":"MIT","dependencies":{"globby":"11.1.0","is-text-path":"2.0.0","p-map":"4.0.0","uglify-js":"3.15.3"},"devDependencies":{"@babel/cli":"7.17.6","@babel/core":"7.17.9","babel-preset-gatsby-package":"2.11.0"},"peerDependencies":{"gatsby":"^5.x"},"scripts":{"build":"babel src --out-dir ."},"bugs":{"url":"https://github.com/mattiaz9/gatsby-plugin-runtime-path-prefix/issues"},"main":"index.js","gitHead":"efd773dbcf3fb2915c611bfbf5d456bcfafae7eb","_id":"@coopertweak/gatsby5-plugin-runtime-path-prefix@2.0.1","_nodeVersion":"18.14.2","_npmVersion":"9.5.0","dist":{"integrity":"sha512-6dYJd3MiD+59BCIMJ1YO6gJHLtO13jkUr0yqJ6jOnktt3XCtdCBYZdvS8oKBv87AxbNE9VxdGLgj77Brbnylgg==","shasum":"61575eebf5ede4e1c30998e6e629c57f5b6f520b","tarball":"https://registry.npmjs.org/@coopertweak/gatsby5-plugin-runtime-path-prefix/-/gatsby5-plugin-runtime-path-prefix-2.0.1.tgz","fileCount":2,"unpackedSize":3481,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCL5AlPZWmM7zovh2wRHBMDklq78tAWWO0nkYNzs4PBkwIhAMoHG6VwgAIGcfftGK2PJPPyX51lvJe6p75wMBX2/Vzk"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkIjXbACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqPmBAAjMEqbiHaJrl9LbW2qc7yc80p00SgaLzP7KwKMv6QbEmmEyyz\r\n2j4ibNkJlJkcDhRktzyed3u0s6eKLIgwuiWI1Tx+aPrslmIZBpr3jNb57V9v\r\nkDnxKJlEOEJeOqNYeUNMOJQQf/c6cTXE9HoNN7CGD0P0scqEGKusyCRJiZ7h\r\nTMyKqefBJto8jnqPOP6al13Hq/vHSZ2GVCHjKcpUtd/niAuJ+uu0B0k+OffZ\r\nukcipfZGA1gVxfJcDmcBtg6dTwbyfWQcP7HD406P7aJ0WwgobWdV5LM3Ror1\r\nyaWwP7NU7i03r7H5TXfLd9lWwW3xvonKxrkxA6jON9cSzwfk+moGnFU2kcfH\r\nPaOSKwJePtr6wU0Id7VyYrYhoIdPIm7fKMBTUnu0Z0pTqV75NhY98nc+ufFJ\r\nJaqcg212LojGXoOJxkjhuBACDpxcujqyX46XzZkckAfyEZ4a87FGiI/uVYsp\r\ntbdnPyo+UtoKS/Npzg4VPX3sLg2wIXizCO3n839SQDbZarwTNz8ca9dcMRDI\r\nu0qACU5rZnVdD8KRNwt288ZIJV4DQiG0VryFUvDwBFyHlXJppqjfmlpgGrTN\r\nQpClVu0FyapeHe7CmWoFbthEGKx+CuMwpBIPvYvwjJz0pOWFzMStz0l6K9sz\r\nzOMG7xZBvTjVyc7wfXz6+EvUOrvCOLA4qME=\r\n=1f9h\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"coopertweak","email":"scottrcoop@gmail.com"},"directories":{},"maintainers":[{"name":"coopertweak","email":"scottrcoop@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/gatsby5-plugin-runtime-path-prefix_2.0.1_1679963611229_0.4485203298329632"},"_hasShrinkwrap":false}},"time":{"created":"2023-03-28T00:33:31.178Z","2.0.1":"2023-03-28T00:33:31.425Z","modified":"2023-03-28T00:33:31.613Z"},"maintainers":[{"name":"coopertweak","email":"scottrcoop@gmail.com"}],"description":"Adds support for deploying Gatsby to Swarm/IPFS by ensuring that assets are relative","homepage":"https://github.com/mattiaz9/gatsby-plugin-runtime-path-prefix","keywords":["gatsby","gatsby-plugin","swarm","ens","ipfs","ipns","relative","prefix","basename"],"repository":{"type":"git","url":"git+ssh://git@github.com/mattiaz9/gatsby-plugin-runtime-path-prefix.git"},"author":{"name":"Mattia Dalzocchio","email":"mattiadalzocchio@me.com"},"bugs":{"url":"https://github.com/mattiaz9/gatsby-plugin-runtime-path-prefix/issues"},"license":"MIT","readme":"# gatsby-plugin-runtime-path-prefix\n\nAdds support for deploying [Gatsby](https://www.gatsbyjs.org/) websites to [Swarm](https://ethersphere.github.io/swarm-home/) and [IPFS](https://ipfs.io/) by ensuring that assets are relative.\n\nThis plugin is a modified version of [gatsby-plugin-ipfs](https://github.com/moxystudio/gatsby-plugin-ipfs/) to add support for deploy on Swarm.\n\n## Installation\n\n```\n# Using npm\nnpm install --save gatsby-plugin-runtime-path-prefix\n\n# Using yarn\nyarn add gatsby-plugin-runtime-path-prefix\n```\n\n## Usage\n\nSet `prefixPath` to an arbitrary string (eg: `__PATH_PREFIX__`) and include the plugin in your `gatsby-config.js` file.\n - Also make sure the option `prefix` is equal to the pathPrefix.\n - The option `pattern` should match the swarm/ipfs path prefix.\n\n```js\nmodule.exports = {\n  pathPrefix: '__PATH_PREFIX__',\n  plugins: [\n    {\n      resolve: `gatsby-plugin-runtime-path-prefix`,\n      options: {\n        prefix: `__PATH_PREFIX__`,\n        pattern: /^(\\/bzz:\\/[^/]+)/ // use /^(\\/(?:ipfs|ipns)\\/[^/]+)/ for IPFS\n      },\n    },\n  ],\n};\n```\n\nTo build with path prefix use the following command:\n```\ngatsby build --prefix-paths\n```\n\n## Options\n| Option                | Example              | Description                                                                                                                    |\n| --------------------- | -------------------- | ------------------------------------------------------------------------------------------------------------------------------ |\n| `prefix`              | `\"__PATH_PREFIX__\"`  | The name of the path prefix set in the `gatsby-config.js` file.                                                                |\n| `pattern`             | `/^(\\/bzz:\\/[^/]+)/` | The pattern of the Swarm/Ipfs subpath.                                                                                         |\n| `forceTrailingSlash`  | `true`               | Redirect `/<path>`  to `/<path>/` when trailing slash is missing. (optional)                                                   |\n| `useBasename`         | `true`               | Replace the relative paths (`../example`) with the current Swarm/Ipfs path after page load. (`/bzz:/hash/example`). (optional) |\n","readmeFilename":"README.md"}