SAGE: Can we output expanded css & js?

How can we edit gulpfile.js to output expanded main.css & main.js in order to help debugging?

FIrst of all, both CSS and JS have source maps when developing, so if you’re using Chrome, it should show you the file and line where CSS is, and where a JS error happens: https://developer.chrome.com/devtools/docs/css-preprocessors

I would fully recommend working with source maps before trying to unminify files and searching through everything compiled into one file.

If you still want to work like that though… just comment these lines: https://github.com/roots/sage/blob/master/gulpfile.js#L110-L113
https://github.com/roots/sage/blob/master/gulpfile.js#L137-L141

1 Like

Thanks Kalen!

By the way, I just noticed something. The order of the css dependencies that you declare inside bower.json is the same as the order of the output in main.css. Except that if there’s some .css and .scss files, the .css files gets written first. Is this normal?