FirebaseGoodies/FireAdmin

How best to keep updates and modify project schema?

dhiraj-das opened this issue ยท 5 comments

Hey @AXeL-dev !

Hope you are doing well!
I have been able to modify this project for my schema but I want to understand how can I leverage updates to the project. I saw quite a few changes since I forked this repo.

Do you have any suggestions?

Hey,

I'm great, i hope you're doing well, as well!

I saw quite a few changes since I forked this repo.

As you said, there was no significant changes to the project lately, which is due to my occupation on other projects & mostly on my full time job, so for now, all i can handle is few changes from time to time.

how can I leverage updates to the project

I don't know if you are talking about updating your fork, or pushing your updates to the main project, but in the first case, since you're using a custom fork of the project, you have to update it manually, using git for example, you can simply create an upstream branch which will be always updated from the main repo., then merge it with your development branch & handle conflicts manually. A plugins system can be implemented in the future to separate core features from custom ones & give other developers the freedom of customising the CMS without headaches.

Thanks for the reply. I have added an upstream and I think that should solve the problem.

I had another doubt - how do I deploy this to firebase hosting? Will this work on firebase hosting? I tried the steps here https://angular.io/start/start-deployment but it does not work. I can only see the default index.html that firebase has created not this project.

I did build the project by running npm run-script build

You're welcome ๐Ÿ˜‰

how do I deploy this to firebase hosting? Will this work on firebase hosting?

Yes it should, since the demo is working on github pages, it should also work on any PHP or nodejs powered hosting.

I did build the project by running npm run-script build

In fact after checking the scripts on the package.json:

FireAdmin/package.json

Lines 4 to 15 in 485ea74

"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build && npm run copy:readme",
"copy:readme": "cp README.md dist/fire-admin/",
"build:demo": "ng build demo",
"build:demo:github": "ng build demo --prod --base-href \"/FireAdmin/\"",
"deploy:demo:github": "ngh --dir=dist/demo",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
},

I figured out or remembered that the project is in fact a workspace, containing both demo & library projects, so when you run npm run-script build it will in fact build the library not the demo project, so in your case, to build the demo project, you have to type the following command: ng build demo --prod

Deploy steps

First, make sure you have the firebase-tools package installed by running:

npm install -g firebase-tools

Next, if you didn't init firebase yet on your project you should do it:

firebase init hosting

If you're asked to choose the deploy folder you have to type: dist/demo, if you missed it, you can change that manually on the firebase.json file

Also, you have to login to your firebase account if you're not logged in:

firebase login

Finally, run the deploy command (don't forget to build the demo project first) :

firebase deploy --only hosting

P.S.: i hope i didn't forget a step ๐Ÿ˜†

This was the culprit - ng build demo --prod
Thanks a lot! Can I work as an intern for you?! ๐Ÿ˜† There's so much to learn from you!

Haha, honestly i hate leader roles, i prefer to be a silent ghost ๐Ÿ‘€, i'm just sick of perfection, so even when it comes to help someone, i always try to provide the best explanation & the maximum details lool ๐Ÿ˜† (need a perfection therapy ๐Ÿ™„ )