-
Check out the repository and install dependencies.
git clone [email protected]:mganjoo/alisha-and-milind-wedding.git cd alisha-and-milind-wedding/ npm run bootstrap:ci
-
Add Firebase credentials.
Go to Firebase Console > Project Settings and scroll down to find the section listing key app credentials. Create files
.env.developmentand.env.production(they will be ignored by Git) in thewebsite/directory of the project, with the following contents:GATSBY_FIREBASE_API_KEY="<apiKey from Firebase>" GATSBY_FIREBASE_AUTH_DOMAIN="<authDomain from Firebase>" GATSBY_FIREBASE_PROJECT_ID="<projectId from Firebase>"
Note: you might also want to add configuration variables for the build and test stage of the project. See Configuration environment variables for available options.
-
Start developing.
Build website continuously:
npm run start:website
-
Start editing.
The site will be running at
http://localhost:8000, and the GraphiQL tool will be athttp://localhost:8000/___graphql.
This project uses
CSS Modules within
Gatsby for some components. To ensure typings are generated for these files, run
npm run generate:csstypes from within the website/ folder.
These options control how the Gatsby site gets generated. These options should only be set on Netlify in staging and production environments, never in CI or test environments.
DISABLE_DEMO_PAGES: When set to"1", disables building any demo pages inpages-demo/.GATSBY_DISABLE_FULL_SITE: When set to"1", disables display of the full website.GA_TRACKING_ID: Tracking code for Google Analytics. If unset, the website will build, but no analytics will be logged. It is better to set this on Netlify than in this repo.GATSBY_GA_BRANCH: Corresponds to the "branch name" to use for Google Analytics. Only relevant ifGA_TRACKING_IDis set.GATSBY_USE_PROD_FIREBASE: When set to"1", uses the environment variablesGATSBY_PROD_FIREBASE_*to configure Firebase instead of theGATSBY_FIREBASE_*variables listed in Getting Started. This enables writes to the production Firebase instance.
This project has Jest configured for unit tests and Cypress for end-to-end tests. They also include visual regression tests set up using Percy.
Cypress configuration variables:
SEED_URL: Variable to use for seeding data for tests. This corresponds to functionseedInvitations.
cd website
npm run testcd website
npm run develop
npm run cy:openThe entire test suite is also run on CI servers, using the test:ci NPM script.