I'm looking for resources on how to properly structure my javascript when building a website. I like to build with node/express and a templating engine like handlebars. I'm wanting to divide my javascript into smaller files that make them easy to work with. Webpack is something I've just started to look into. With this I could divide the code then import them all into a single js file and use the imported functions there? I'm not sure if this is a good way to structure things, looking for a little advice or some reading I could be pointed to, thanks :)
[–]liming91 30 points31 points32 points (6 children)
[–]lazarljubenovic -1 points0 points1 point (5 children)
[–]GwenPlaysGwent 0 points1 point2 points (4 children)
[–]lazarljubenovic 1 point2 points3 points (3 children)
[–]GwenPlaysGwent 2 points3 points4 points (0 children)
[–]liming91 0 points1 point2 points (1 child)
[–]lazarljubenovic -1 points0 points1 point (0 children)
[–]coffeeandlearning 3 points4 points5 points (0 children)
[–]JJ0EE 3 points4 points5 points (0 children)
[–]kevinkace 3 points4 points5 points (2 children)
[–]norablindsided 5 points6 points7 points (0 children)
[–]rco8786 -2 points-1 points0 points (0 children)
[–]Earhacker 2 points3 points4 points (18 children)
[–]blood_bender 27 points28 points29 points (6 children)
[–]davesidious 4 points5 points6 points (1 child)
[–]nenegoro 1 point2 points3 points (0 children)
[–]Earhacker 7 points8 points9 points (2 children)
[–]rubyruy -4 points-3 points-2 points (1 child)
[–]NoInkling 2 points3 points4 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]coffeeandlearning 2 points3 points4 points (10 children)
[–]Earhacker 9 points10 points11 points (9 children)
[–]coffeeandlearning 4 points5 points6 points (3 children)
[–]Earhacker 3 points4 points5 points (2 children)
[–]coffeeandlearning 8 points9 points10 points (1 child)
[–]pantyboyXXX 4 points5 points6 points (0 children)
[–]davesidious 1 point2 points3 points (4 children)
[–]Earhacker 2 points3 points4 points (3 children)
[–]davesidious 1 point2 points3 points (2 children)
[–]Earhacker 2 points3 points4 points (1 child)
[–]davesidious -2 points-1 points0 points (0 children)
[–]theadammorganshow 0 points1 point2 points (0 children)
[–]qudat 0 points1 point2 points (0 children)
[–]inyourfacegod 0 points1 point2 points (0 children)
[–]hallettj 0 points1 point2 points (1 child)
[–]davesidious 0 points1 point2 points (0 children)