CodeIgniter Forums
Please help choose a folder for npm packages ! - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28)
+--- Forum: CodeIgniter 4 Support (https://forum.codeigniter.com/forumdisplay.php?fid=30)
+--- Thread: Please help choose a folder for npm packages ! (/showthread.php?tid=73757)



Please help choose a folder for npm packages ! - Digital_Wolf - 05-31-2019

Hello CI4 Team !

I want to use npm packages for javascript, such as WebSocket, canvas and others, which folder is best to deploy ?
1) ThirdParty
2) Libraries
or 
3) Public/path/to/app

PS: I use CI version 4*.


RE: Please help choose a folder for npm packages ! - ciadmin - 05-31-2019

If these are for JS libraries for client-side stuff, then I would think they would go in public/...


RE: Please help choose a folder for npm packages ! - dave friend - 05-31-2019

(05-31-2019, 06:31 AM)Digital_Wolf Wrote: Hello CI4 Team !

I want to use npm packages for javascript, such as WebSocket, canvas and others, which folder is best to deploy ?
1) ThirdParty
2) Libraries
or 
3) Public/path/to/app

PS: I use CI version 4*.

If the packages are JavaScript then put them in the same folder where you have other non-npm scripts, i.e. JQuery.


RE: Please help choose a folder for npm packages ! - kilishan - 05-31-2019

Make a new folder at project root and call it good? I'm assuming you'll have a build script that compiles the packages into public/js or whatever.


RE: Please help choose a folder for npm packages ! - Digital_Wolf - 05-31-2019

I don’t need the files to be publicly accessed because there will not be JQuiry and similar scripts, only the websocket server that will give the information to the script in the public directory.