Skip to content

Commit c5bfca3

Browse files
authored
Perf initialize snippets (#219)
1 parent 91b44d9 commit c5bfca3

File tree

4 files changed

+15
-4
lines changed

4 files changed

+15
-4
lines changed

perf-next/index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@
44
const perf = getInstance();
55

66
function intialize() {
7-
// [START perf_initialize]
7+
// [START perf_imports]
88
const { initializeApp } = require("firebase/app");
99
const { getPerformance } = require("firebase/performance");
10+
// [END perf_imports]
1011

12+
// [START perf_initialize]
1113
// TODO: Replace the following with your app's Firebase project configuration
1214
// See: https://firebase.google.com/docs/web/setup#config-object
1315
const firebaseConfig = {

perf/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1+
// [START perf_imports]
12
import firebase from "firebase/app";
23
import "firebase/performance";
4+
// [END perf_imports]
35

46
const perf = firebase.performance();
57

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// This snippet file was generated by processing the source file:
2+
// ./perf-next/index.js
3+
//
4+
// To update the snippets in this file, edit the source and then run
5+
// 'npm run snippets'.
6+
7+
// [START perf_imports_modular]
8+
import { initializeApp } from "firebase/app";
9+
import { getPerformance } from "firebase/performance";
10+
// [END perf_imports_modular]

snippets/perf-next/index/perf_initialize.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@
55
// 'npm run snippets'.
66

77
// [START perf_initialize_modular]
8-
import { initializeApp } from "firebase/app";
9-
import { getPerformance } from "firebase/performance";
10-
118
// TODO: Replace the following with your app's Firebase project configuration
129
// See: https://firebase.google.com/docs/web/setup#config-object
1310
const firebaseConfig = {

0 commit comments

Comments
 (0)