contao / managed-edition

Contao Managed Edition
17 stars 13 forks source link

.public files only in dev mode? #18

Closed Defcon0 closed 7 years ago

Defcon0 commented 7 years ago

Currently I write a small module for handling scss and css in Contao 4.3. At the moment, this results in a composed css file. Next to that file I generate a .css.map file containing all the references. Unfortunately this file is currently useless because we don't let scss files go into the web folder (which is a good practice I guess). So the references from the map to the scss files is dead.

To my knowledge the way to go for creating symlinks by the contao console is to add a .public file into the folder that should be symlinked to the web folder.

Are these .public files environment independend (which I fear ;-) ) or is there a chance that we can in Contao 4.4 make some of these only be active in dev mode? Could also be a feature request, I'm not sure.

Thanks in advance.

backbone87 commented 7 years ago

imho you could write a dev env only route with a custom controller that serves the scss file and rewrite the map references to that controller.

leofeyer commented 7 years ago

Are these .public files environment independend

Yes, they are.

is there a chance that we can in Contao 4.4 make some of these only be active in dev mode?

I don't think so. At least I don't see a real use case here.

leofeyer commented 7 years ago

As discussed in Mumble on July 13th, environment dependent symlinks are technically not possible. You would have to do what @backbone87 suggested (or something similar).