Skip to content
This repository has been archived by the owner on Sep 16, 2019. It is now read-only.

Every little project requires 70,000 files? #797

Closed
hawbsl opened this issue Apr 18, 2016 · 8 comments
Closed

Every little project requires 70,000 files? #797

hawbsl opened this issue Apr 18, 2016 · 8 comments

Comments

@hawbsl
Copy link

hawbsl commented Apr 18, 2016

FoundationPress is fab and we are using it for all our website projects.

Thing is, our website projects are mostly small, and we do lots of them. So each time we work through Ole's instructions to start a new project (instructions which are nice and clear, BTW) we draw down nearly 70,000 mostly bower/node files costing hundreds of MBs in disk space. For each little project.

The disk space isn't a problem, really, but the burden of working with so many little files is huge if and when we ever have to copy or move stuff around the file system. For each and every little project.

Are we doing this wrong?

image

@hawbsl hawbsl changed the title Every little project is requires 70,000 files? Every little project requires 70,000 files? Apr 18, 2016
@dantahoua
Copy link
Contributor

Nothing's wrong I think! That's why there is the 'npm run package' function... So you end up with a very small package with just what you need for your theme in the end... My finished theme are between 3Mo and 5Mo depending of the image I use or the javascripts library I use...

@hawbsl
Copy link
Author

hawbsl commented Apr 18, 2016

@dantahoua i agree that the deployed theme is small. but it seems "wrong" somehow to duplicate 70000 files for each project in development

@Aetles
Copy link
Contributor

Aetles commented Apr 25, 2016

I think part of this has to do with the intention to make each project more self-contained and prevent issues with different projects requiring different versions of the same global component.

If you have many different FoundationPress projects created at different times and then try to work on an old project it can be a long visit in "dependency hell" just to get it running. When each project contains the exact the right version of each component for that project it could prevent some of that pain. The price for that is a lot of redundant files in each project.

(That being said, I would really like to see better documentation of why each component is used in FoundationPress. Just look at package.json and try to figure out what each component does and if you really need it for your project… Do I need gulp-plumber? Why is gulp-phpcbf used? Etc etc…)

@hawbsl
Copy link
Author

hawbsl commented Apr 26, 2016

@Aetles thanks for taking the time to comment. I guess so.
FoundationPress has been an education to me, introduced me to grunt and gulp and so on. If and when I understand it better perhaps i can create my own much lighter version, that suits these little projects of ours better. as its stands, i'm already deleting out tons of it every week when i start new project. I need to create my own starter version i suppose.

@Aetles
Copy link
Contributor

Aetles commented Apr 26, 2016

Yeah, maintaining your own starter version is not a bad idea. It can be a lot of work to keep it updated (because you probably have to do it manually when your version is too different for merges to work) but the upside is that you have control over it and you can decide what changes you like and what changes you don't want in your code.

@swthate
Copy link

swthate commented May 11, 2016

I just wanted to pipe in a quick suggestion to @hawbsl because you mentioned the pain of moving all those files around the file system from time to time. I found that if you just delete node_modules (I think you can do this with bower_components too), move your files, and then run npm install from the new location it will download and install those directories, which oddly seems to go a lot faster than moving them around yourself.

@olefredrik
Copy link
Owner

As @swthate said, you can safely delete both node_modules and assets/components folders. The files in these folders are only useful when you're developing your theme. npm install will bring em back in any case.

@hawbsl
Copy link
Author

hawbsl commented May 12, 2016

@swthate good suggestion, moving files is so slow and npm install isn't too bad, so what you've said makes sense (albeit oddly)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants