Created
April 5, 2011 17:40
-
-
Save joemccann/904081 to your computer and use it in GitHub Desktop.
Does it write to a file?
This file contains hidden or 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
var express = require('express') | |
, css = require('stylus') | |
, str = require('fs').readFileSync(__dirname + '/public/css/style.styl', 'utf8'); | |
// What makes sense to me is pass in "str" to be rendered and write that data to the file named "style.css". | |
// But examples show it being named "style.styl" which I thought was already loaded from "str"??? | |
css.render(str, {filename: __dirname + '/public/css/style.css'}, function(err, css){ | |
if (err) throw err; | |
console.log(css); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment