-
-
Save davexunit/a4d8011b09e0b9c7afc95bc17f14abbb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(make-page "foo.css" | |
;; Add other necessary context here. | |
'((input-file . "foo.scss")) | |
(lambda (args port) | |
;; I don't use a sass compiler so I'm just making the | |
;; options up. Hopefully sass can output to STDOUT. | |
(let* ((pipe (open-pipe* OPEN_READ "sass" (assq-ref args 'input-file)))) | |
;; There's ways of doing i/o redirection so you don't | |
;; have to read the entire pipe output into Scheme, but | |
;; I don't remember how off the top of my head and this | |
;; is just a quick example rather than an efficient | |
;; one. | |
(display (get-string-all pipe) port) | |
(unless (zero? (status:exit-val (close-pipe pipe))) | |
(error "uh oh"))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment