Last active
August 29, 2015 14:15
postcss-import-test
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
node_modules/ |
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
// dependencies | |
var fs = require("fs") | |
var postcss = require("postcss") | |
var atImport = require("postcss-import") | |
// css to be processed | |
var css = fs.readFileSync("input.css") | |
// process css | |
var output = postcss() | |
.use(atImport()) | |
.process(css, { | |
// `from` option is required so relative import can work from input dirname | |
from: "input.css" | |
}) | |
.css | |
console.log(output) |
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
p { | |
color: blue; | |
} |
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
p { | |
} |
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
@import url("http://hello.myfonts.net/count/"); | |
@import "foo.css"; | |
/*@import "bar.css";*/ |
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
{ | |
"name": "postcss-import-test", | |
"version": "1.0.0", | |
"private": true, | |
"devDependencies": { | |
"postcss": "~4.0.3", | |
"postcss-import": "~5.0.0" | |
}, | |
"oldDependencies": { | |
"postcss": "~3.0.0", | |
"postcss-import": "~4.1.1" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment