• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Working with composer and views

#1
Hi
I've little experience with Composer.
I could finally install IonAuth using Composer.
As requirements, it installs 37 packages while in dev stage

Code:
$ composer config minimum-stability dev
$ composer config repositories.ionAuth vcs [email protected]:benedmunds/CodeIgniter-Ion-Auth.git
$ composer require benedmunds/CodeIgniter-Ion-Auth:4.x-dev

What should I do once I finish developing the App to clean unused packages and not to upload the whole vendor folder?

Also, please note the location of IonAuth's view files

Code:
D:\www\myproj\vendor\benedmunds\codeigniter-ion-auth\Views\auth

What are the "best practices" to include those views in my already-built bs4 template? Should I move those views to App/Views/auth and then integrate my template into each view, right?
But I guess moving those views will break IonAuth composer's installation...

Thanks for any clarification you can give me about this
Reply

#2
What you generally do are to ignore that folder all together, you generally don't upload the vendor folder. Just have a correct composer.json file that require those dependencies, and people need to install them themselves.

You should copy those views from the vendor folder into your own application.
Reply

#3
If I don't upload the vendor folder, I won't be able to use the package. The CI App won't work. I mean, I'm not using to develop an app to publish on github that users will download and with composer update they download the packages. It is an App users need to use, etc.

When using IonAuth latest for CI4, moving the views from vendor....../Views/auth to my App/Views/auth won't work
It keeps searching the views there, but I guess I'll need to modify the controller, everything to make it work. V3 was much easier lol

Thanks
Reply

#4
Okay, then you need to upload the vendor server (of course!). You can however upload everything except that folder, and install it with composer, without dev on the live server. So that you don't get all the extra.

Haven't user IonAuth, so didn't know about that odd behaviour.
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.