aboutsummaryrefslogtreecommitdiffstats
path: root/src/blogc-make/rules.c
diff options
context:
space:
mode:
authorRafael G. Martins <rafael@rafaelmartins.eng.br>2019-02-25 22:43:51 +0100
committerRafael G. Martins <rafael@rafaelmartins.eng.br>2020-01-12 12:37:11 +0100
commit7870e88f0653e6ac93c1f2e123aa9826778be376 (patch)
tree98d9c0840bf809ab5be36539680d0997762f3bb4 /src/blogc-make/rules.c
parenta45e7255cb89d76c4836e1cac073c2f941529e70 (diff)
downloadblogc-7870e88f0653e6ac93c1f2e123aa9826778be376.tar.gz
blogc-7870e88f0653e6ac93c1f2e123aa9826778be376.tar.bz2
blogc-7870e88f0653e6ac93c1f2e123aa9826778be376.zip
make: implemented optional sass support using libsassfeature/sass
pending: - tests for sass support - build tests on ci with and without libsass - documentation - support sass options in blogcfile
Diffstat (limited to 'src/blogc-make/rules.c')
-rw-r--r--src/blogc-make/rules.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/blogc-make/rules.c b/src/blogc-make/rules.c
index 06223c0..41e363d 100644
--- a/src/blogc-make/rules.c
+++ b/src/blogc-make/rules.c
@@ -6,6 +6,10 @@
* See the file LICENSE.
*/
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif /* HAVE_CONFIG_H */
+
#include <stdbool.h>
#include <stdio.h>
#include <string.h>
@@ -22,6 +26,10 @@
#include "utils.h"
#include "rules.h"
+#ifdef USE_LIBSASS
+#include "./sass.h"
+#endif
+
static void
posts_ordering(bm_ctx_t *ctx, bc_trie_t *variables, const char *variable)
@@ -850,6 +858,15 @@ const bm_rule_t rules[] = {
.exec_func = copy_exec,
.generate_files = true,
},
+#ifdef USE_LIBSASS
+ {
+ .name = "sass",
+ .help = "build CSS stylesheets from Sass (.scss) sources",
+ .outputlist_func = bm_sass_outputlist,
+ .exec_func = bm_sass_exec,
+ .generate_files = true,
+ },
+#endif
{
.name = "clean",
.help = "clean built files and empty directories in output directory",