Firebase code pull

空扰寡人 提交于 2019-11-26 16:32:29
Kato

There is no method available to grab your Firebase code. You should be utilizing your own version control (e.g. git) to manage your revisions and backups.

Since all your files are static assets, you could always scrape them using wget:

wget -r -np https://<YOURAPPNAME>.firebaseapp.com

Read more on scraping web sites here: https://apple.stackexchange.com/questions/100570/getting-files-all-at-once-from-a-web-page-using-curl

Maybe this answer is not exactly consisted with requested direction but in order to list the files which are being uploaded you could during the deploy use --debug switch:

firebase deploy --debug

With this option you will see the POST request. Something like that:

>>> HTTP REQUEST POST https://deploy.firebase.com/firebase/yourapp/releases?token=XXX public=dist, version=-KE5UDaj7oCppckjEBaE, prefix=-KE5UDaj7oCppckjEBaE/, manifest=[path=404.html, object=404.html, path=scripts\main\main.html, object=scripts\main\main.html, path=scripts\scripts.d6106dbd.js, object=scripts\scripts.d6106dbd.js, path=scripts\vendor.68cdc83b.js, object=scripts\vendor.68cdc83b.js, path=styles\main.5b335e2d.css, object=styles\main.5b335e2d.css, path=styles\vendor.d41d8cd9.css, object=styles\vendor.d41d8cd9.css], rules=undefined <<< HTTP RESPONSE 200 server=nginx, date=Wed, 30 Mar 2016 07:46:31 GMT, content-type=application/json; charset=utf-8, content-length=34, connection=close, access-control-allow-origin=*, access-control-allow-methods=GET, PUT, POST, DELETE, OPTIONS, strict-transport-security=max-age=31556926; includeSubDomains; preload, x-content-type-options=nosniff

It might helps to trace what is rally uploaded to firebase hosting.

But I agree that the lack option to simple list the files on firebase hosting do not encourage to use this service.

Ujjwal Gupta
  1. Its quite simple,the only thing you need to do is go to your hosted site.
  2. right click and go to inspect element => debugger.There you will find a static folder.
  3. relax,all your js files are there(front end only),you can copy your code.
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!