This repository is the recommended template for developing with Firebase.
It has a very simple and minimum directory structure, and ready to deploy and test.
You don't have to run firebase init anymore.
- Create your repository from this template. Please click "Use this template".
- See more: Creating a repository from a template
- Run
yarn installto install dependencies. - Open
.firebasercand change<your firebase project id>to your firebase project id. - [Optional] Add alias(es) to
.firebaserc(e.g. "dev", "prod"). - [Optional] Write or copy
firestore.rules,storage.rules,firestore.indexes.jsonif needed. - [Optional] Execute
yarn firebase loginif you haven't logged in yet. - Remove
.github/FUNDING.ymlandREADME.md🙏 These aren't involved with development. - Have a good development 🔥🔥🔥.
- Node version: 8 (v8.16.2 is recommended).
- Source directory:
src/ - Deploy directory:
dist/ - Hosting files directory:
public/ - Test directory:
test firestore.rules,storage.rules, andfirestore.indexes.jsonare initial state.- The following is the list of prepared script commands:
- build: Build `src` directory.
- serve: Launch functions emulator.
- shell: Launch functions shell.
- deploy: Deploy to Firebase project.
- logs: Print function's logs.
- test-rules: Run test of `firestore.rules`.
If you want to use npm instead of yarn, please replace yarn to npm in package.json.