※このコマンドで、「command not found: firebase」といわれたら
$ npm install -g firebase-tools
をやってください。
※このコマンドで「Error: Not in a Firebase app directory (could not locate firebase.json)」
といわれたら
firebase init
さらに
Command requires authentication, please run firebase login
と言われたら
firebase login
Allow Firebase to collect anonymous CLI usage information? Yes
Gmailでログインできる #5
firebase init
What Firebase project do you want to associate as default?
#6
設定ファイルの質問に答える
ここからコンソール上で質問されます。
プロジェクトに合わせた設定にしてください。
以下わたしの場合。
↓
? What Firebase CLI features do you want to setup for this folder?
このフォルダに何のfirebaseCLIを設定したいの?
→今回はサイトをhostingしたいだけなので
→Database: Deploy Firebase Realtime Database Rules, Hosting: Configu
re and deploy Firebase Hosting sites
=== Project Setup
What Firebase project do you want to associate as default?
何のFirebaseプロジェクトをデフォルトとして結合したいの??
→新しくつくるので
→create a new project
? What file should be used for Database Rules?
→どのファイルをDatabaseRulesとして使うの?
→database.rules.json
?What do you want to use as your public directory?
公開するディレクトリとして何を使うの??
→public直下に置きたいので
→public
※ここでの設定で既にgulpなどで書き出し先フォルダがある場合ファイル階層を変更する必要がある場合があります)
Configure as a single-page app (rewrite all urls to /index.html)?
SPAとして設定する?//Reactとか使うならYes
No
File public/index.html already exists. Overwrite?
public配下にindex.htmlがあるけど書き換える??
No