Created
October 30, 2014 15:41
-
-
Save h4/3af1e6359ddf37e66c22 to your computer and use it in GitHub Desktop.
stylus base64
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 stylus = require('stylus'); | |
var fs = require('fs'); | |
var str = fs.readFileSync('contacts/contacts.styl', {encoding: 'utf-8'}); | |
console.log(__dirname); | |
stylus(str) | |
.set('filename', __dirname + '/contacts/contacts.styl') | |
.define('url', stylus.url()) // Включает base64 | |
.render(function(err, css){ | |
fs.writeFileSync('contacts/contacts.css', css); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment