Skip to content

Commit 0053627

Browse files
committed
refactor: move vite and firebase config to storage directory
1 parent 0602a30 commit 0053627

10 files changed

Lines changed: 1530 additions & 17 deletions

File tree

package.json

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,10 @@
1919
"devDependencies": {
2020
"eslint": "^8.39.0",
2121
"eslint-plugin-promise": "^6.1.1",
22-
"lerna": "^6.6.1",
23-
"typescript": "^5.1.6",
24-
"vite": "^4.4.9"
22+
"lerna": "^6.6.1"
2523
},
2624
"scripts": {
27-
"dev": "vite",
28-
"build": "vite build",
2925
"bootstrap": "lerna bootstrap",
30-
"test": "scripts/test.sh",
31-
"format": "prettier --write ."
32-
},
33-
"dependencies": {
34-
"firebase": "^10.1.0"
26+
"test": "scripts/test.sh"
3527
}
3628
}
File renamed without changes.
File renamed without changes.

firebase.json renamed to storage/firebase.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,5 @@
2222
"port": 4000
2323
},
2424
"singleProjectMode": true
25-
},
26-
"functions": {
27-
"source": "functions"
2825
}
2926
}

storage/main.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import {
77
uploadBytes,
88
getDownloadURL,
99
} from 'firebase/storage';
10-
import { firebaseConfig } from '../config';
10+
import { firebaseConfig } from './config';
1111

1212
const fileInput = document.getElementById('file') as HTMLInputElement;
1313
const linkBox = document.getElementById('linkbox') as HTMLDivElement;
@@ -62,14 +62,14 @@ auth.onAuthStateChanged(function (user) {
6262
fileInput.disabled = false;
6363
} else {
6464
console.log(
65-
'There was no anonymous session. Creating a new anonymous user.'
65+
'There was no anonymous session. Creating a new anonymous user.',
6666
);
6767
// Sign the user in anonymously since accessing Storage requires the user to be authorized.
6868
signInAnonymously(auth).catch(function (error) {
6969
if (error.code === 'auth/operation-not-allowed') {
7070
window.alert(
7171
'Anonymous Sign-in failed. Please make sure that you have enabled anonymous ' +
72-
'sign-in on your Firebase project.'
72+
'sign-in on your Firebase project.',
7373
);
7474
}
7575
});

0 commit comments

Comments
 (0)