javascript - Gulp/Grunt folder Structure and Practices for PHP Projects -


I am learning Gujarat and I am wondering how to use it in a specific project folder which includes a / js folder Which keeps all of my Javascript files ..

Now I want to reduce them to a live server, I have to do the workings to do, but how do you arrange the folder structure? Is there any good idea to do this?

Method 1: All javascript files in one

so all javascript files are to be collected in 1 javascript file and included.

My question is here: I have a lot of page-specific JavaScript, like my homepage is a slider that rely on a certain device with ID, but on other pages that element Not there, So JavaScript does not have the necessary elements to work, and does not need code for that page?

on topic

I am very interested in your thoughts!

a different / src (source files For) and / build (for minified files). Folders inside your / js folder Another way to add mined files to .min and keep them with your source files One potential downside of these methods is that you You must update all the references to your Javascript files in your templates.

Lukasz's view Probably I would recommend, because at least the work is required. In the end, it is up to you and your personal choice.


Comments

Popular posts from this blog

apache - 504 Gateway Time-out The server didn't respond in time. How to fix it? -

c# - .net WebSocket: CloseOutputAsync vs CloseAsync -

c++ - How to properly scale qgroupbox title with stylesheet for high resolution display? -