|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
simplex Smarty n00b
Joined: 03 Apr 2021 Posts: 4
|
Posted: Sat Apr 03, 2021 8:31 pm Post subject: Frontend packages management in a smarty project |
|
|
Hi,
I am currently restructuring and optimizing a big smarty project. I am wondering what the best way to organize frontend libs is. At the moment all these scripts are scattered in a few unorganized folders and added to the tpl files. I want to use a package manager, to make maintenance updating and dependency management of these scripts simple, same as in the js frameworks.
What I have done for now for testing, is using bower to organize scripts in a custom folder /scripts. from there I just include the scripts in the tpl files. This way seems pretty good and clean because I can easily take care of the updating via bower. and all the scripts are in the same folder
However, bower unfortunately is depreceated and no new libs can be added to it.
So I am looking for a different way to achieve the same. I have looked into npm, but for some reasons it spams the script dir full of scripts I don't need. I have also looked into Yarn but it is not really made to be used in this way, and I can't achieve what I want with it.
Thankful for any suggestions
Cheers |
|
Back to top |
|
AnrDaemon Administrator
Joined: 03 Dec 2012 Posts: 1785
|
|
Back to top |
|
simplex Smarty n00b
Joined: 03 Apr 2021 Posts: 4
|
Posted: Tue Apr 06, 2021 1:20 am Post subject: |
|
|
Thanks a lot, that article was actually quite useful.
For everybody who has the same requirement, I decided to roll with a combination of webpack, npm and bower (for packages not available in npm). Works well, but webpack might require a few hours of reading, as the config is a bit overwhelming. But it can do everything you would ever need related to js, scss and css in a smarty project. |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|