apex-nitro icon indicating copy to clipboard operation
apex-nitro copied to clipboard

Keeping scss subfolders in the dist folder

Open rafael-trevisan opened this issue 4 years ago • 2 comments

Hi, I am migrating some projects from Nitro v4 to v5.

In my v4 project, I have a folder scss which contains subfolders for i.e., pages, templates, themes and etc. In all these folders I have .scss files.

When I run apex-nitro build I need that the dist folder contains a folder called css with all these subfolders and the css compiled for each file.

Is that something we can easily achieve with v5?

I am looking to keep the same folder structure as I had with v4 because otherwise I will have to change the references in the apps.

rafael-trevisan avatar Mar 17 '21 00:03 rafael-trevisan

Interesting.

In v5 (advanced mode) we have designed for a single output of js and css, so the short answer is no.

However I think this should be supported, so adding to 5.1

vincentmorneau avatar Mar 17 '21 11:03 vincentmorneau

That's great, @vincentmorneau! Thx.

My use case for these subfolders is: I have a folder called pages which has scss files specific for any given "pages" I need to customize. Other folder called templates which has the scss files for any custom template the app is using and so on.

Screen Shot 2021-03-17 at 9 54 35 AM

Then, of course, in each "page" or "custom template" I add the reference for the css/pages/page-1234.css for example. It gets organized and easy to maintain.

Another thing I noticed was that other folders inside my "src" folder were not being copied to the "dist" folder, for i.e., I have a folder called assets, lib and pwa and ideally I will need all these folders being copied. I could obviously move these folders to the new static folder, but then I'd have to re-map all the references in the app. Does that make sense?

I switched back to v4.1.6 for now, once v5.1 is available I will give another shot.

Thanks again.

rafael-trevisan avatar Mar 17 '21 16:03 rafael-trevisan