Skip to content
Browse files

Use Stylus for server-side CSS [#664]

  • Loading branch information...
1 parent 3520c13 commit 9e963d716afedb9fc9d6fdda9dc970d3c11e28e0 @jbuck jbuck committed Apr 11, 2012
Showing with 8 additions and 1 deletion.
  1. +1 −0 .gitignore
  2. +4 −0 cornfield/app.js
  3. 0 css/{butter.ui.css → butter.ui.deprecated.css}
  4. +1 −0 css/butter.ui.styl
  5. +2 −1 package.json
View
1 .gitignore
@@ -14,3 +14,4 @@ dist
*.mp3
node_modules
cornfield/view
+css/butter.ui.css
View
4 cornfield/app.js
@@ -4,6 +4,7 @@ const express = require('express'),
fs = require('fs'),
path = require('path'),
app = express.createServer(),
+ stylus = require('stylus'),
CONFIG = require('config'),
TEMPLATES_DIR = CONFIG.dirs.templates,
PUBLISH_DIR = CONFIG.dirs.publish,
@@ -49,6 +50,9 @@ app.use(express.logger(CONFIG.logger))
.use(express.bodyParser())
.use(express.cookieParser())
.use(express.session(CONFIG.session))
+ .use(stylus.middleware({
+ src: WWW_ROOT
+ }))
.use(express.static( WWW_ROOT ))
.use(express.static( PUBLISH_DIR ))
.use(express.directory( WWW_ROOT, { icons: true } ) );
View
0 css/butter.ui.css → css/butter.ui.deprecated.css
File renamed without changes.
View
1 css/butter.ui.styl
@@ -0,0 +1 @@
+@import "butter.ui.deprecated.css"
View
3 package.json
@@ -52,7 +52,8 @@
"express": "*",
"express-browserid": "*",
"config": "*",
- "mongoose": "*"
+ "mongoose": "*",
+ "stylus": "*"
},
"license": "MIT",
"engine": {

0 comments on commit 9e963d7

Please sign in to comment.
Something went wrong with that request. Please try again.