Skip to content

Commit

Permalink
Merge pull request #5 from mikenikles/add-firebase-hosting-for-static…
Browse files Browse the repository at this point in the history
…-assets

Add firebase hosting for static assets
  • Loading branch information
Mike Nikles committed May 18, 2020
2 parents f7689e8 + 507d160 commit 3ff38a1
Show file tree
Hide file tree
Showing 6 changed files with 4,722 additions and 1 deletion.
5 changes: 5 additions & 0 deletions firebase/.firebaserc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"projects": {
"default": "sapper-on-cloud-run"
}
}
67 changes: 67 additions & 0 deletions firebase/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
public

# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
firebase-debug.log*

# Firebase cache
.firebase/

# Firebase config

# Uncomment this if you'd like others to create their own Firebase project.
# For a team working on the same Firebase project(s), it is recommended to leave
# it commented so all members can deploy to the same project(s) in .firebaserc.
# .firebaserc

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# nyc test coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env
18 changes: 18 additions & 0 deletions firebase/firebase.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"hosting": {
"public": "public",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
],
"predeploy": "rm -fr ./public && cp -r ../static ./public",
"rewrites": [{
"source": "**",
"run": {
"serviceId": "sapper-on-cloud-run",
"region": "us-central1"
}
}]
}
}

0 comments on commit 3ff38a1

Please sign in to comment.