Maybe this is to much, the other day I was learning/using a little this app, so I imported a lot of images and make a "demo site"... I showed my 3 pages to a client, then to send it in email I exported the project and zipped the thing and I got a 16Mb file... I think I didn't use all the images, thought I really dont know if bootstrap studio gives that "clean" setup of the export folder, or I should try to keep more clean workflow for not end with large exports?
BSS exports everything you have imported to it so if you imported a lot of images that you are not using you may want to delete that folder or folders of images and reimport them with only those you are using for the project. This is the same for all JS files and fonts as well, all will be included that you have uploaded or linked to, regardless of if something is used on the page or not. This means that if you have imported or linked to fonts or JS, that the scripts and links will be on all pages even if you don't reference them in the content.
Always a good practice to only import the things you are actually using, or at least not a whole lot of extraneous images that aren't used "yet" but may be later.
Thank you for starting this discussion, @tyoc213!
Yes, the app exports everything, as we can't be sure which images are used and which are not. For example you could be using a jQuery plugin which dynamically changes the src attributes of images depending on screen resolution, and Bootstrap Studio can't learn this just by looking at the HTML.
But very few people use libraries like this, so we can add a checkbox in the Export Settings dialog that removes all images that aren't used in the HTML or CSS. It won't be checked by default, but you can enable it if you want this behavior. Do you think this would solve the problem you are facing?
That would work for the most part, but I think it would hinder anyone that did decide to use external scripts that referenced images and could cause issues there.
I've been mulling over possibilities on what would be great for the CSS, images, js, fonts, etc.. I'm no programmer so I just offer ideas of what I "think" would work well, but of course I can't always be sure. So here's what I'm thinking.
One of the other things people have been concerned about is the links in the HEAD of each page having to contain "all" fonts and CSS files as well as all pages having to show all of the JS at the bottom even when not used on every page. What if there were a switch for each item that was read by each page. A checkbox would work well. If an image is used on that page, check the box next to it. If not then leave it blank. This would then (through your programming of course), tell the app at export which images to export (this would be a project by project setting), which JS files should show up on a page (this would be a page by page setting), which fonts would be on a page (also a page by page setting), and could even apply to the CSS and any other sections that may be added in the future.
This would solve a few things actually. Firstly it would solve the issue of what to export, secondly it would solve the issue of having to have every single JS, CSS, and Font file referenced on every single page, and thirdly it could do one more important thing that I've been meaning to ask about: The ability to turn on/off an item in app.
Many times I find myself wanting to try things, but in order to try them they "have" to be imported and cannot conflict with others. An example would be checking out a script. Maybe I have found 4 different scripts that all do the same thing. I don't want them all turned "on" so in order to do this now I have import or add a Custom Component for one. Test it out, then delete it to try the next one, all to find the one that I want to use.
With the ability to use on/off checkboxes, you could allow us to basically turn "off" an item/script/etc. and be able to have multiple items imported to try them. This saves the time of having to reimport if you want to try one "again" that you had already tried and so on.
I have no idea if this is way far out there and too hard to implement, but if not it might make future things more easily added if something like this were implemented. Maybe that would help with the "deletion" of files and images too as many have commented on that there is no way to make sure you didn't delete the wrong one as it's hard to tell right now, you just hope you right clicked over the right file lol.
Ok I'm done brainstorming lol. If it's too far out there just say so, but seems that something on this order would help to manage the files a little easier.