{"_id":"@1amageek/reaf","_rev":"2-7af73c54ce9a6fcbfd6b3e0f9997b193","name":"@1amageek/reaf","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.0":{"private":false,"name":"@1amageek/reaf","publishConfig":{"access":"public"},"version":"1.0.0","description":"Host Next.js SSR app on Firebase Cloud Functions with Firebase Hosting redirects. Built with typescript.","engines":{"node":"10"},"main":"index.js","scripts":{"dev":"next src/app","preserve":"npm run build-public && npm run build-functions && npm run build-app && npm run copy-deps && npm run install-deps","serve":"cross-env NODE_ENV=production firebase serve","preemulate":"npm run build-public && npm run build-functions && npm run build-app:emulator && npm run copy-deps && npm run install-deps","emulate":"cross-env NODE_ENV=production firebase emulators:start","deploy":"firebase deploy","clean":"rimraf \"dist/functions\" && rimraf \"dist/public\"","build-app":"next build \"src/app\"","build-app:emulator":"EMULATE_ENV=emulator next build \"src/app\"","build-public":"cpx \"src/public/**/*.*\" \"dist/public\" -C","build-functions":"tsc --project src/functions","lint-app":"tslint --project src/app","typecheck-app":"tsc --project src/app","lint-functions":"tslint --project src/functions","copy-deps":"cpx \"*{package.json,package-lock.json,yarn.lock}\" \"dist/functions\" -C","install-deps":"cd \"dist/functions\" && npm i"},"dependencies":{"@1amageek/ballcap":"^0.5.6","@material-ui/core":"^4.8.0","@material-ui/icons":"^4.5.1","@material-ui/styles":"^4.7.1","firebase":"^7.6.0","firebase-admin":"^8.8.0","firebase-functions":"^3.3.0","next":"latest","react":"^16.12.0","react-dom":"^16.12.0"},"devDependencies":{"@types/node":"^12.12.20","@types/react":"^16.9.16","@types/react-dom":"^16.9.4","cpx":"^1.5.0","cross-env":"^6.0.3","dotenv-webpack":"^1.7.0","file-loader":"^5.0.2","firebase-tools":"^7.10.0","rimraf":"^3.0.0","ts-loader":"^6.2.1","tslint":"^5.20.1","tslint-react":"^4.1.0","typescript":"^3.7.3"},"gitHead":"3837909ffc3c2a86c0edc64d567ccd765d4cacca","_id":"@1amageek/reaf@1.0.0","_nodeVersion":"12.13.1","_npmVersion":"6.12.1","dist":{"integrity":"sha512-Em/NVVuMK/Z9y1QVAYnzbsCJuKFmOQFalMxQVqokdfSegwEEjBw05iFuhDelhHr/iqt66LaHuKbEvzlYJY7qsQ==","shasum":"4065472d3e0c1a182c492c347b6517666ee43657","tarball":"https://registry.npmjs.org/@1amageek/reaf/-/reaf-1.0.0.tgz","fileCount":23,"unpackedSize":12917,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd+iX4CRA9TVsSAnZWagAAHGYP/1l6bKKe66R3VKXmMdzd\nrmUyPTvYfz52a5OFAj88U8pTay+GhxKI2Wi8VU8ajJ/RmDBsT31U7fQMXm28\nnhTC6cpx11+Dv/c0AHqOPDTH+PwvbrSfLgKDY+oHzKCCXRG+se+QPgERNw5d\n7HEZR9ReCbF32GJH+Mf1pvURtYM3g1CxIb1JekjFbHSN/8Tm5wcmCtk9hbir\nsun8hBiU7vvL+/Hh68nhnI/VKsMHbLF/XgSwjDOhQgHIwkCHJI8O6u52y3RT\nFv+dguD9L6hrzF6zCLTF4NCgobflmcFz8my6CKc19pvRWEQiyp/7vOLgc8fR\ntQUGaGhtTnx+yjiIUztgnoHc+gkHfpU81E3LXXhOE1/sZGlcqFXtj/y4h/Sa\nHqNGpQMynx8MS62n1OnPiN7zenreDVjQwApOAIUUgOiz9fM/CW90mZtwQNk/\nvcqt1/9w3FaKIS20Cqst3agJe+lgV49iqwYGbzww3O8V0B0JBJD3Pev2vyWY\nU37XsMHq5s3auVtRpmH6YEI//ItTrPdeJImnsJD/nVjJKDBXmjRRVs/IONDG\nzlNjTY0mij8IsoZ8MnDC3rVkRvdOJoqpTjqvFOGvpDPXzkthASYAlytE6oF/\n0BTEpOhXtg0U0Ila2ks6DFmWOl4O/f+uVEiYAGHiZcH7CftEO1U6DYedj2Rp\nu2m3\r\n=8gtp\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEBTRtEU3oZXsEXoSNMzDFolrmzZs5dKzwf0QXj2a6BHAiAhHcqRq83ACPLa6+9IE1C+OfkWHcTMq8PuLY4J54Xq8Q=="}]},"maintainers":[{"name":"1amageek","email":"tmy0x3@icloud.com"}],"_npmUser":{"name":"1amageek","email":"tmy0x3@icloud.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/reaf_1.0.0_1576674807939_0.001437348659113491"},"_hasShrinkwrap":false},"1.0.1":{"name":"@1amageek/reaf","version":"1.0.1","description":"Host Next.js SSR app on Firebase Cloud Functions with Firebase Hosting redirects. Built with typescript.","engines":{"node":"10"},"main":"index.js","scripts":{"dev":"next src/app","preserve":"npm run build-public && npm run build-functions && npm run build-app && npm run copy-deps && npm run install-deps","serve":"cross-env NODE_ENV=production firebase serve","preemulate":"npm run build-public && npm run build-functions && npm run build-app:emulator && npm run copy-deps && npm run install-deps","emulate":"cross-env NODE_ENV=production firebase emulators:start","deploy":"firebase deploy","clean":"rimraf \"dist/functions\" && rimraf \"dist/public\"","build-app":"next build \"src/app\"","build-app:emulator":"EMULATE_ENV=emulator next build \"src/app\"","build-public":"cpx \"src/public/**/*.*\" \"dist/public\" -C","build-functions":"tsc --project src/functions","lint-app":"tslint --project src/app","typecheck-app":"tsc --project src/app","lint-functions":"tslint --project src/functions","copy-deps":"cpx \"*{package.json,package-lock.json,yarn.lock}\" \"dist/functions\" -C","install-deps":"cd \"dist/functions\" && npm i"},"dependencies":{"@1amageek/ballcap":"^0.5.6","@material-ui/core":"^4.8.0","@material-ui/icons":"^4.5.1","@material-ui/styles":"^4.7.1","firebase":"^7.6.0","firebase-admin":"^8.8.0","firebase-functions":"^3.3.0","next":"latest","react":"^16.12.0","react-dom":"^16.12.0"},"devDependencies":{"@types/node":"^12.12.20","@types/react":"^16.9.16","@types/react-dom":"^16.9.4","cpx":"^1.5.0","cross-env":"^6.0.3","dotenv-webpack":"^1.7.0","file-loader":"^5.0.2","firebase-tools":"^7.10.0","rimraf":"^3.0.0","ts-loader":"^6.2.1","tslint":"^5.20.1","tslint-react":"^4.1.0","typescript":"^3.7.3"},"gitHead":"3837909ffc3c2a86c0edc64d567ccd765d4cacca","_id":"@1amageek/reaf@1.0.1","_nodeVersion":"12.13.1","_npmVersion":"6.12.1","dist":{"integrity":"sha512-qdN8de5iOT78TX48Obx15wJ/jGqEJyz+oT1twJTWuQJ9BtWHYH9klFMJ2BupPx5QMXP1XJox2U6g/LNHIIYpEg==","shasum":"7df8622e64f7c635d10141192d79b14cf15f9bea","tarball":"https://registry.npmjs.org/@1amageek/reaf/-/reaf-1.0.1.tgz","fileCount":23,"unpackedSize":12853,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd+idxCRA9TVsSAnZWagAAhiMP/jOHtqAQu6GKZD7z6S0S\nnkREO2JoJmCzMVIRjR+RTJg5XN0kPnPM7YMSn1WDbGQW+HrGRyy+GsfXPE5T\n55/ykv2+oMhyiBK47tlQv9RYJDVdU1icjOdJe8QvpVVNkHWEATEdfkCtHrvB\nJOu/B5ZvoLXcyPKLBegfN6OlH5lHwU1BLC6jKUFpnognIuZ5jBkBa+J2FEpM\naxedzpbsodWBeKPj8eV5WDegJc7yXIfWFkJurA1F5X3IrMys21wU/Uf88eE2\n5jJNWHk1chA1HW1Ts6FPURY3ea2Bg2piJZv2uFYTrS0drEdI3WN25f5k/frQ\n+I3TaQu1lSJGuN5F9wjKEX00w0q84vwJE0FRA7UYUmFUO0Ger2QhG6dyVtlo\nbTR2AqHk4Zbp9cIy04ryZ5GF0VcjCBfPM5kFVhi5UZtb40F6MrExjmzUY9mr\ncCiqKp5IKJxoCd2kJmL/yWzAkJyinUasgY5HkQHDVDQEj2YgUXqBqDqZsjLJ\ni9b90vII6v/3BpCo8ez/GFiVjx0t1jgUQDkBQrcoppHIU4Vr0ODOm0EaD0sH\nZWt/Zjoabp3GhLIQeE+7Q7gP6VCjuGQmYCAB9wUHnvG62Mt3ywS6zoEyIb5R\nDJ/tzrubX1J6zGCGsmrjQPzMGztD2hO3hdkBi/pTi12mIQBYJub/+YulHWgL\naxJz\r\n=6VgH\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAQPWEjebdf8hmtR3EugK2VOHw1mE8JyXHqFpvMJrpuSAiEAiCLognh4ZcMoaJFGar08IwCYIa+oMvX+ex+8dJkniuI="}]},"maintainers":[{"name":"1amageek","email":"tmy0x3@icloud.com"}],"_npmUser":{"name":"1amageek","email":"tmy0x3@icloud.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/reaf_1.0.1_1576675185001_0.7652508182753857"},"_hasShrinkwrap":false}},"time":{"created":"2019-12-18T13:13:27.892Z","1.0.0":"2019-12-18T13:13:28.073Z","modified":"2022-04-04T10:32:40.144Z","1.0.1":"2019-12-18T13:19:45.142Z"},"maintainers":[{"name":"1amageek","email":"tmy0x3@icloud.com"}],"description":"Host Next.js SSR app on Firebase Cloud Functions with Firebase Hosting redirects. Built with typescript.","readme":"# With Firebase Hosting and Typescript example\n\n## How to use\n\n### Using `create-next-app`\n\nExecute [`create-next-app`](https://github.com/zeit/next.js/tree/canary/packages/create-next-app) with [Yarn](https://yarnpkg.com/lang/en/docs/cli/create/) or [npx](https://github.com/zkat/npx#readme) to bootstrap the example:\n\n```bash\nnpx create-next-app --example with-firebase-hosting-and-typescript with-firebase-hosting-and-typescript-app\n# or\nyarn create next-app --example with-firebase-hosting-and-typescript with-firebase-hosting-and-typescript-app\n```\n\n### Download manually\n\nDownload the example:\n\n```bash\ncurl https://codeload.github.com/zeit/next.js/tar.gz/canary | tar -xz --strip=2 next.js-canary/examples/with-firebase-hosting-and-typescript\ncd with-firebase-hosting-and-typescript\n```\n\nSet up firebase:\n\n- install Firebase Tools: `npm i -g firebase-tools`\n- create a project through the [firebase web console](https://console.firebase.google.com/)\n- grab the projects ID from the web consoles URL: https://console.firebase.google.com/project/<projectId>\n- update the `.firebaserc` default project ID to the newly created project\n- login to the Firebase CLI tool with `firebase login`\n\n#### Install project:\n\n```bash\nnpm install\n```\n\n#### Run Next.js development:\n\n```bash\nnpm run dev\n```\n\n#### Run Firebase locally for testing:\n\n```\nnpm run serve\n```\n\n#### Deploy it to the cloud with Firebase:\n\n```bash\nnpm run deploy\n```\n\n#### Clean dist folder\n\n```bash\nnpm run clean\n```\n\n## The idea behind the example\n\nThe goal is to host the Next.js app on Firebase Cloud Functions with Firebase Hosting rewrite rules so our app is served from our Firebase Hosting URL, with a complete Typescript stack for both the Next app and for the Firebase Functions. Each individual `page` bundle is served in a new call to the Cloud Function which performs the initial server render.\n\nThis is based off of the work of @jthegedus in the [with-firebase-hosting](https://github.com/zeit/next.js/tree/canary/examples/with-firebase-hosting) example.\n\nIf you're having issues, feel free to tag @sampsonjoliver in the [issue you create on the next.js repo](https://github.com/zeit/next.js/issues/new)\n\n## Important\n\n- The empty `placeholder.html` file is so Firebase Hosting does not error on an empty `public/` folder and still hosts at the Firebase project URL.\n- `firebase.json` outlines the catchall rewrite rule for our Cloud Function.\n- The [Firebase predeploy](https://firebase.google.com/docs/cli/#predeploy_and_postdeploy_hooks) hooks defined in `firebase.json` will handle linting and compiling of the next app and the functions sourceswhen `firebase deploy` is invoked. The only scripts you should need are `dev`, `clean` and `deploy`.\n- Specifying [`\"engines\": {\"node\": \"8\"}`](package.json#L5-L7) in the `package.json` is required for firebase functions\n  to be deployed on Node 8 rather than Node 6\n  ([Firebase Blog Announcement](https://firebase.googleblog.com/2018/08/cloud-functions-for-firebase-config-node-8-timeout-memory-region.html))\n  . This is matched in by specifying target as `es2017` in [`src/functions/tsconfig.json`](src/functions/tsconfig) so that typescript output somewhat compacter and moderner code.\n","readmeFilename":"README.md"}