Skip to content

Instantly share code, notes, and snippets.

@simplesNotEZ
Created October 25, 2018 18:40
Show Gist options
  • Save simplesNotEZ/fa1b17fbaa3d89a30f02255325033c18 to your computer and use it in GitHub Desktop.
Save simplesNotEZ/fa1b17fbaa3d89a30f02255325033c18 to your computer and use it in GitHub Desktop.
*Publishing Angular to firebase*
// Log into firebase and create a project
// Make sure npm isn’t running anything any place in any terminal
// Change to your angular app folder.
//For me, I did the first dino drill in angular, and so I was in the version-1 folder, and my project folder was named drill1angular. So, from the version-1 folder, I typed `cd drill1angular`
*ng build --prod*
// creates a build folder and merges files into a compact build version.
// Now...cd into your dist/project-folder. Again, I named my project folder drill1angular, and since I was already in version-1/drill1angular, I typed cd dist/drill1angular. _Yes, now there's two project folders named the same thing that are in different places._ Make _sure_ you're in the project folder inside the dist folder. For me, that path was version-1/drill1angular/dist/drill1angular
*firebase init*
// select hosting
// select your project
// *type . as your public directory*
// configure as single page app NO
// overwrite index.html NO
*firebase use --add*
// type your alias - I always just use the same name as the project folder
*firebase deploy*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment