{"dist":{"shasum":"1d935c321bbb1f4a4bf3be2e1c1d96e6c3a571e2","tarball":"https://registry.npmjs.org/solid-ssr/-/solid-ssr-1.0.0-beta.0.tgz","fileCount":8,"integrity":"sha512-crPYikylzV9ooUl4fTXjt+tdWAkQKMCvYc2HINVfhvbeYWEKDlllrcPLtTpSgupbigJMI9o2urVzOHnwa7IZFw==","signatures":[{"sig":"MEYCIQCgs2L8yMuu9FTJgzj7Qot7KuIRIpD4yUQazvIof8OroQIhALx5bvy4brPkzgV4p3urKsDVgW+EepyE6n6jqp/oU/m8","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":6964,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgybf8CRA9TVsSAnZWagAAg3QP/25qi3XdvU01u4Q2I9sS\nWsBeQ0xDURJAwNGOFirrTURtYZa2tgdQ1uzZj1KRVGVew4/3WmKfmj6AyTC1\nKNTxekk37VRyiLJobRAD1lAZN30df7DCfSwBgKDoSEWrtCmN4M9SVZyTJavb\nci4NvuavuQ9SBEqoDA5S8ciwe3SxpBnOrOrssiNMO2DhH8nu2J8sVhmqgQxr\nmnA9e/vQDw1DiIb+yQox/sxgFHvtlCe5ixtlCcupVoqKuiNfKBJexEca2uko\nQAMd71wr+DyXuC2TWhxcG5WJp9bgiQdRAtC+5Wt1YEkxEH1BBBZ7hcXqTUTQ\n090Uj+4Wsbkf0xBYq3TfJf0We6TDTWOZbC6OAvo3PAYP6VVNtTKpdkSPrpi4\nhkjO/fJmJyreUveINlEYpJoaO5AfuQajSjRwqP8Xf67DhiP/h9bGl+s+1HmV\nXOy0XXWWQaOFjFt6w8VvtWnRry5oBAESm/Ob2l8P8zBxats4JVNThZQpQyBS\nIZFLhM+dMkwO4VZgn5Qg1yGs67iSX+vmKDB2EuCEgAL2ptwjJzhXbnI+4uvK\n5DO0+8fZ/v2ZPrOeaK/uXThI2Xn2upmyFNOZUu+gTZjKvQxlFoBgh1yf6hex\nKO0O0BClZTrhr/+EJ6a7xAe3jqx7JwkRMC0z7BgF58VU2X5TAfi7/rQYRswd\n4uoi\r\n=vPnV\r\n-----END PGP SIGNATURE-----\r\n"},"name":"solid-ssr","author":{"name":"Ryan Carniato"},"readme":"# `solid-ssr`\n\nThis library provides tools to help with SSR. So far it's a simple Static Generator. But will add more tools in the future.\n\n## solid-ssr/static\n\nThis is a simple runner that renders files and writes them to disk. It exports a single export that can be used in either CJS or ESM.\n\n```js\nrenderStatic(\n  PAGES.map(p => ({\n    entry: pathToServer,\n    output: path.join(pathToPublic, `${p}.html`),\n    url: `/${p}`\n  }))\n);\n```\n\nEach entry expects 3 values:\n* entry: path to the server entry point you will be using to render the page\n* output: path to the location of the html file you wish to write\n* url: the url that will be passed on the faux request object\n\nEntry files should be async functions that return the html string in the form:\n```js\nexport default async function(req) {\n  return \"<html>My Page</html>\"\n}\n```\n\n## Examples\n\nLook at the examples to best understand how to use it. Important I make use of conditional export maps here in node. You need the latest version of Node 14 (or latest Node 12 but this example doesn't work in Node 12, sorry).\n\nThere are 4 examples all using the same shared source. It is an isomorphically routed tab navigation using Suspense, Lazy Components, and Data Fetching. They are just compiled differently and have slightly different server entry points.\n\n1. ssr\n\nUses standard synchronous SSR. Renders what it can synchronously on the server and hydrates top level in the client. Async data is fetcbed and rendered in the client without hydration.\n\n2. stream\n\nSimilar to `ssr` except using streams. Data is loaded on the server and sent along the stream so the client can render it. Again only initial HTML is hydrated. Slightly speeds up data loading, so total page load time is reduced.\n\n3. async\n\nResolves everything reactively on server before sending HTML and serialized data to the client. Whole page is hydrated, but all loading states are avoided. Total load time is similar to streaming, but time to first paint is blocked by how long it takes to load data.\n\n4. ssg\n\nUsing async compiler configuration to statically generate pages. Removes the time it takes to render real time.\n\nExamples run on http://localhost:8080/. To run them (in this case ssr):\n```\nlerna run build:example:ssr --stream\nlerna run start:example:ssr --stream\n```","exports":{"./static":{"import":"./static/index.mjs","require":"./static/index.js"}},"gitHead":"b04715bf6e984c62e137bee5f4b202d5421225cf","license":"MIT","scripts":{"clean":"shx rm -rf examples/**/lib/ examples/**/public/","build:example:ssg":"rollup -c examples/ssg/rollup.config.js && node --trace-warnings examples/ssg/export.js","build:example:ssr":"rollup -c examples/ssr/rollup.config.js","start:example:ssg":"npx serve examples/ssg/public -l 8080","start:example:ssr":"node examples/ssr/lib/index.js","build:example:async":"rollup -c examples/async/rollup.config.js","start:example:async":"node examples/async/lib/index.js","build:example:stream":"rollup -c examples/stream/rollup.config.js","start:example:stream":"node examples/stream/lib/index.js"},"_npmUser":{"name":"ryansolid","email":"ryansolid@gmail.com"},"repository":{"url":"https://github.com/solidjs/solid/blob/main/packages/solid-ssr","type":"git"},"_npmVersion":"lerna/3.22.1/node@v15.11.0+arm64 (darwin)","description":"Utilities to help with SSR","directories":{},"maintainers":[{"name":"ryansolid","email":"ryansolid@gmail.com"}],"_nodeVersion":"15.11.0","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"shx":"^0.3.3","rollup":"^2.51.1","express":"^4.17.1","solid-js":"^1.0.0-beta.0","@babel/core":"^7.14.5","babel-preset-solid":"^1.0.0-beta.0","rollup-plugin-copy":"^3.4.0","@rollup/plugin-babel":"^5.3.0","@rollup/plugin-commonjs":"^19.0.0","solid-styled-components":"^0.26.3","@rollup/plugin-node-resolve":"^13.0.0"},"_npmOperationalInternal":{"tmp":"tmp/solid-ssr_1.0.0-beta.0_1623832572356_0.1739867635584158","host":"s3://npm-registry-packages"},"_id":"solid-ssr@1.0.0-beta.0","version":"1.0.0-beta.0"}