[sass] Canonical way to generate the ".min.css" file?
Hi,
I'm trying the sass plugin with bootstrap Scss files and I would like to what it the canonical way to generate the bootstrap.min.css file if any.
In my targets file, I can put bootstrap.scss and it generates correctly assets/css/bootstrap.css, however, I cannot use bootstrap.min.css:
(colour-science.org-USMIstgQ-py3.7) Kali:colour-science.org kelsolaar$ nikola build
Scanning posts..........done!
ERROR: Two different tasks can't have a common target.'output/assets/css/bootstrap.min.css' is a target for copy_assets:output/assets/css/bootstrap.min.css and build_sass:output/assets/css/bootstrap.min.css.
Cheers,
Thomas
No canonical way, usually the upstream provides it.
Just use whatever minimizer you like :-)
On Sat, Apr 18, 2020 at 10:44 PM Thomas Mansencal [email protected] wrote:
Hi,
I'm trying the sass plugin with bootstrap Scss files and I would like to what it the canonical way to generate the bootstrap.min.css file if any.
In my targets file, I can put bootstrap.scss and it generates correctly assets/css/bootstrap.css, however, I cannot use bootstrap.min.css:
(colour-science.org-USMIstgQ-py3.7) Kali:colour-science.org kelsolaar$ nikola build Scanning posts..........done! ERROR: Two different tasks can't have a common target.'output/assets/css/bootstrap.min.css' is a target for copy_assets:output/assets/css/bootstrap.min.css and build_sass:output/assets/css/bootstrap.min.css.
Cheers,
Thomas
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/getnikola/plugins/issues/330, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAAMKYH27ZSF4IPOOWIHJDRNJJNNANCNFSM4MLS2MPA .
All good and thanks Roberto! I was just checking in case I was missing something obvious!
Just sass isn’t enough to build Bootstrap, by the way. I built my Bootstrap pipeline outside of Nikola, you can steal the Node script for the second step if you want.
To generate the css files, I only needed sass and the scss directory.
Yes, but those files are not fully compatible with all browsers. The missing step is running autoprefixer.
Good to know, given everything seeming LGTM on Chrome, Firefox, Safari and IE, I don't think I will bother introducing an extra step.