Giter VIP home page Giter VIP logo

firebase-hosting's Introduction

๐Ÿ”ฅ Add Firebase Hosting to Svelte

โ“ What is this?

This is an experimental command to run to add hosting on Firebase to your SvelteKit project.

๐Ÿ›  Usage

You must start with a fresh copy of the official SvelteKit template, which is currently created by running this command.

npm init svelte@next
# By the way, please listen to its warnings that SvelteKit is an alpha project
# https://svelte.dev/blog/whats-the-deal-with-sveltekit#When_can_I_start_using_it

Once that is set up, run this command in your project directory to set up hosting on Firebase:

npx apply svelte-add/firebase-hosting # --no-ssh

After the preset runs,

  • You cannot use server-side rendering. Your site must be static. This means that, among other things, svelte-add/graphql is currently not suitable to be hosted on Firebase.

  • Consider setting up GitHub Actions for automatic building and deployment to Firebase.

    Start by generating a CI login token from Firebase:

    npm run firebase login:ci

    Then, go to your repository's Settings > Secrets. Copy the result of the command above and save it as a Secret named FIREBASE_TOKEN.

    You can test if it's working by making a commit to main or master and checking the Actions tab of your repository to see if your project successfully builds and deploys to Firebase.

  • You can create a custom 404 page at src/routes/404.svelte.

  • You can use the deploy package script to manually deploy the site after a build.

  • You can apply another Svelte Adder to your project for more functionality.

๐Ÿ˜ต Help! I have a question

Create an issue and I'll try to help.

๐Ÿ˜ก Fix! There is something that needs improvement

Create an issue or pull request and I'll try to fix.

These are new tools, so there are likely to be problems in this project. Thank you for bringing them to my attention or fixing them for me.

๐Ÿ“„ License

MIT


Repository preview image generated with GitHub Social Preview

This README was generated with โค๏ธ by readme-md-generator

firebase-hosting's People

Contributors

babichjacob avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.