Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

Frontend packages management in a smarty project

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General
View previous topic :: View next topic  
Author Message
simplex
Smarty n00b


Joined: 03 Apr 2021
Posts: 4

PostPosted: Sat Apr 03, 2021 8:31 pm    Post subject: Frontend packages management in a smarty project Reply with quote

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
View user's profile Send private message
AnrDaemon
Administrator


Joined: 03 Dec 2012
Posts: 1785

PostPosted: Sun Apr 04, 2021 4:56 pm    Post subject: Reply with quote

Try this article https://medium.com/the-node-js-collection/modern-javascript-explained-for-dinosaurs-f695e9747b70
However, this is not really a Smarty question.
Back to top
View user's profile Send private message
simplex
Smarty n00b


Joined: 03 Apr 2021
Posts: 4

PostPosted: Tue Apr 06, 2021 1:20 am    Post subject: Reply with quote

AnrDaemon wrote:
Try this article https://medium.com/the-node-js-collection/modern-javascript-explained-for-dinosaurs-f695e9747b70
However, this is not really a Smarty question.


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
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General All times are GMT
Page 1 of 1

 
Jump to:  
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
Protected by Anti-Spam ACP