@@ -17,7 +17,7 @@ This plugin implements a subset of functions of [postcss-import](https://github.
17
17
18
18
The most important differences are:
19
19
20
- * ` postcss-simple-import ` is quite configurable
20
+ * ` postcss-simple-import ` is crazily configurable
21
21
* ` postcss-simple-import ` is always asynchrounous
22
22
23
23
## Options
@@ -36,6 +36,7 @@ Specify how to load files when processing `@import`.
36
36
Type: ` Function `
37
37
38
38
Receives the import url, and the options object.
39
+
39
40
Should return a promise which resolves to an row object:
40
41
* ` file ` : * String* * required* the resolved file path
41
42
* ` source ` : * String* * optional* the contents of the file
@@ -46,14 +47,15 @@ File contents cache.
46
47
Every time before ` readFile ` ,
47
48
` cache ` is checked.
48
49
49
- * NOTE* : if ` importer ` gives ` source ` , it should handle ` cache ` itself.
50
+ ** NOTE* * : if ` importer ` gives ` source ` , it should handle ` cache ` itself.
50
51
51
52
### readFile
52
53
Specify how to read file contents.
53
54
54
55
Type: ` Function `
55
56
56
57
Receives a filename and encoding.
58
+
57
59
Should return a promise which resolves to the contents of the file.
58
60
59
61
### glob
@@ -62,6 +64,7 @@ Specify how to resolve globs.
62
64
Type: ` Function `
63
65
64
66
Receives the glob string, and an object ` { cwd: dirname_of_the_processed_file } ` .
67
+
65
68
Should return a promise which resolves to an array of file paths.
66
69
67
70
@@ -74,6 +77,7 @@ Specify how to resolve file paths.
74
77
Type: ` Function `
75
78
76
79
Receives the import string, and an object ` { basedir: dirname_of_the_processed_file } ` .
80
+
77
81
Should return a promise which resolves to an absolute file path.
78
82
79
83
Type: ` Object `
@@ -98,6 +102,7 @@ Type: `Function`
98
102
Default: ` postcss.parse `
99
103
100
104
Recieves an object ` { file: file_path, source: file_contents } ` .
105
+
101
106
Should return a promise which resolves to the AST object
102
107
103
108
0 commit comments