postcss-import
Advanced tools
Comparing version 4.1.0 to 4.1.1
@@ -0,1 +1,5 @@ | ||
# 4.1.1 - 2015-01-05 | ||
- Fix irregular whitespace that throw syntax error in some environnements | ||
# 4.1.0 - 2014-12-12 | ||
@@ -2,0 +6,0 @@ |
@@ -264,3 +264,3 @@ "use strict"; | ||
// if it's look like it doesn't start with a relative path already | ||
if (name.match(/^\.\.?/)) {throw e} | ||
if (name.match(/^\.\.?/)) {throw e} | ||
file = resolve.sync("./" + name, resolveOpts) | ||
@@ -267,0 +267,0 @@ } |
{ | ||
"name": "postcss-import", | ||
"version": "4.1.0", | ||
"version": "4.1.1", | ||
"description": "PostCSS plugin to import CSS files", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -26,12 +26,14 @@ # postcss-import [![Travis Build Status](https://travis-ci.org/postcss/postcss-import.svg)](https://travis-ci.org/postcss/postcss-import) [![AppVeyor Build status](https://ci.appveyor.com/api/projects/status/u8l6u3lr6s5u5tpi?svg=true)](https://ci.appveyor.com/project/MoOx/postcss-import) | ||
// css to be processed | ||
var css = fs.readFileSync("stylesheets/input.css", "utf8") | ||
var css = fs.readFileSync("css/input.css", "utf8") | ||
// process css | ||
var output = postcss({ | ||
// `from` option is required so relative import can work from input dirname | ||
from: "stylesheets/input.css" | ||
}) | ||
var output = postcss() | ||
.use(atImport()) | ||
.process(css) | ||
.process(css, { | ||
// `from` option is required so relative import can work from input dirname | ||
from: "css/input.css" | ||
}) | ||
.css | ||
console.log(output) | ||
``` | ||
@@ -43,7 +45,7 @@ | ||
/* can consume `node_modules`, `web_modules` or local modules */ | ||
@import "my-css-on-npm"; /* == @import "./node_modules/my-css-on-npm/index.css"; */ | ||
@import "cssrecipes-defaults"; /* == @import "./node_modules/cssrecipes-defaults/index.css"; */ | ||
@import "foo.css"; /* relative to stylesheets/ according to `from` option above */ | ||
@import "css/foo.css"; /* relative to stylesheets/ according to `from` option above */ | ||
@import "bar.css" (min-width: 25em); | ||
@import "css/bar.css" (min-width: 25em); | ||
@@ -50,0 +52,0 @@ body { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
15721
142