Simplest way to reorganize files and their dependencies? (SOLVED)

Simplest way to reorganize files and their dependencies? (SOLVED)
0

#1

Hi,

I have leveraged the same dependencies for 4 different projects in one file.

So, I have 4 different HTML files that load different sites in the same folder.

Now that I am initializing git to track changes, this is actually making it harder to comment out changes on individual files.

I want to solve this problem, but duplicating all the dependencies (CSS, JS files that are used in all the apps)… seems inefficient.

My solution would be to move the project-specific JS and HTML files to new files, but then there are 14-20 dependencies which would immediately need to be updated.

Is there a way to simplify this?

Any thoughts?

Should I just copy and paste the whole of the project into 4 different files and call it a day?

Its a new problem, so hard to picture the simplest solution… any feedback is welcome…


#2

This is solved now. In case it is helpful, I quickly duplicated the whole directory, renamed the copy, and then deleted all files that seemed irrelevant to the portion of the project for each file.

In essence, I split the project into two copies and then deleted files that seemed non-relevant.

What this means is that all of the dependencies will be loaded to the server for each site twice, which I imagine is not the most efficient, but for the moment it solves the problem, I wanted to be able to track changes between the different projects so the files needed to be separated… It would seem.

Anyhow, I researched how to find orphaned files, (the ones not being used by a folder), to quicken the process, and I found a couple methods involving web crawlers. At the same time, deciphering the jargon inside the web crawlers to determine how to get the info needed was moving too slowly for the level of importance. I imagine that for a gig this might be worth following through on, but for this, problem solved with about the level of attention it required… rough cut and on to the next thing.