best practice: Where to store JS-files? |
I am using several JS/JQuery files in my views. Optimizing data tables or some AJAX calls for example.
Where do you recommend to store javascript files within the Codeigniter4 environment?
If you are developing JS separately as a project (React, Ve, Vanilla), I would recommend using a separate folder at the ./frontend/ (./app/ level). And publish them after the build in ./public/
If these are small ready-made scripts, then ./public/{js,assets,css} is the right place
12-06-2023, 11:58 PM
(This post was last modified: 12-06-2023, 11:59 PM by InsiteFX. Edit Reason: spelling error )
root
-- app -- system -- public -> or (public_html) ---- assets ------ css ------ js ------ img ------ images ------ plugins -- etc; What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
|
Welcome Guest, Not a member yet? Register Sign In |