forked from jnordberg/wintersmith-less
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
41 additions
and
2 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
@import 'nib' | ||
|
||
body | ||
box-shadow: 0 0 1px black |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
wintersmith = require('wintersmith') | ||
wsStylus = require('./../') | ||
|
||
describe "Nib integration", -> | ||
|
||
beforeEach (done)-> | ||
|
||
# Install this plugin onto wintersmith | ||
wsStylus wintersmith, -> | ||
|
||
# Installed, now wintersmith can handle .styl | ||
done() | ||
|
||
it "should compile stylus with nib", (done)-> | ||
|
||
# Parse contents | ||
wintersmith.ContentTree.fromDirectory 'test/contents/css', __dirname, (err, tree)-> | ||
|
||
# For style.styl, we want to make sure styl is compiling using nib | ||
tree['style.styl'].render null, null, null, (err, content)-> | ||
|
||
if content? | ||
content.should.equal(""" | ||
body { | ||
-webkit-box-shadow: 0 0 1px #000; | ||
-moz-box-shadow: 0 0 1px #000; | ||
box-shadow: 0 0 1px #000; | ||
}""") | ||
# yay | ||
done() | ||
|
||
|