{"id":15728589,"url":"https://github.com/jacob-ian/firebase-functions-exporter","last_synced_at":"2026-05-08T13:39:23.362Z","repository":{"id":39750449,"uuid":"484708898","full_name":"jacob-ian/firebase-functions-exporter","owner":"jacob-ian","description":"A helper tool to automatically import and export Firebase Functions from a directory.","archived":false,"fork":false,"pushed_at":"2022-05-26T11:57:45.000Z","size":169,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-18T16:57:52.388Z","etag":null,"topics":["firebase","firebase-functions","javascript","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jacob-ian.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null}},"created_at":"2022-04-23T09:55:57.000Z","updated_at":"2022-04-30T04:36:57.000Z","dependencies_parsed_at":"2022-09-21T01:51:02.580Z","dependency_job_id":null,"html_url":"https://github.com/jacob-ian/firebase-functions-exporter","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jacob-ian%2Ffirebase-functions-exporter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jacob-ian%2Ffirebase-functions-exporter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jacob-ian%2Ffirebase-functions-exporter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jacob-ian%2Ffirebase-functions-exporter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jacob-ian","download_url":"https://codeload.github.com/jacob-ian/firebase-functions-exporter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246403916,"owners_count":20771530,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["firebase","firebase-functions","javascript","typescript"],"created_at":"2024-10-03T23:04:10.344Z","updated_at":"2026-05-08T13:39:18.331Z","avatar_url":"https://github.com/jacob-ian.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Firebase Functions Exporter\nA utility that quickly exports all TypeScript/JavaScript Firebase Functions from all of a directory's subdirectories.\n\n## Usage\n1. Install the package in your Firebase Functions directory (usually `/functions`):\n   1. With Yarn: `yarn add firebase-functions-exporter`\n   2. With NPM: `npm i --save firebase-functions-exporter`\n2. Write your Firebase Functions in their own files, following the pattern `[NAME].function.ts` or `[NAME].function.js`, grouped in directories of your choosing. For example:\n   1. TypeScript (with functions grouped by type):\n      ```\n      functions\n        src\n          index.ts\n          callable\n            updateUser.function.ts\n            createUser.function.ts\n          restful\n            posts.function.ts\n          event\n            onUserCreate.function.ts\n      ``` \n      `functions/src/event/onUserCreate.function.ts`:\n      ```ts\n      import * as functions from 'firebase-functions';\n\n      export const onUserCreate = functions.auth.user().onCreate((user, context) =\u003e {\n        functions.logger().log(`User created: ${JSON.stringify(user)}`);\n      });\n      ```\n    1. JavaScript (with functions grouped by category):\n       ```\n       functions\n          index.js\n          users\n            createUser.function.js\n            updateUser.function.js\n            onUserCreate.function.js\n          posts\n            onPostUpdate.function.js\n       ```\n       `functions/posts/onPostUpdate.function.js`\n       ```js\n       const functions = require('firebase-functions');\n\n       exports.onPostUpdate = functions.firestore.document('/post/{postId}')\n        .onUpdate((snap, context) =\u003e {\n          functions.logger.log(`Post Updated: ${JSON.stringify(snap)}`);\n       })\n       ```\n3. Define `exportFunctions` as the export in the functions index file:\n   1. TypeScript:\n      `functions/src/index.ts`: \n      ```ts\n      import { exportFunctions } from 'firebase-functions-exporter';\n\n      module.exports = exportFunctions();\n      ```\n    1. JavaScript: `functions/index.js`:\n        ```js\n        const { exportFunctions } = require('firebase-functions-exporter');\n\n        module.exports = exportFunctions()\n        ``` \n4. Deploy to Firebase Functions:\n   `firebase deploy --only functions`.\n\n## Notes\n- If using default exports, the function will take the name of the file, i.e. the name of a default exported function in the file `onUserCreate.function.ts` will be `onUserCreate`.\n- Deploying to Firebase Functions will fail if two or more functions have the same name.\n\n## Licence\nMIT","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjacob-ian%2Ffirebase-functions-exporter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjacob-ian%2Ffirebase-functions-exporter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjacob-ian%2Ffirebase-functions-exporter/lists"}