Skip to content

Commit 5de3b67

Browse files
committed
readme
1 parent 13cd4fc commit 5de3b67

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

README.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ This plugin implements a subset of functions of [postcss-import](https://github.
1717

1818
The most important differences are:
1919

20-
* `postcss-simple-import` is quite configurable
20+
* `postcss-simple-import` is crazily configurable
2121
* `postcss-simple-import` is always asynchrounous
2222

2323
## Options
@@ -36,6 +36,7 @@ Specify how to load files when processing `@import`.
3636
Type: `Function`
3737

3838
Receives the import url, and the options object.
39+
3940
Should return a promise which resolves to an row object:
4041
* `file`: *String* *required* the resolved file path
4142
* `source`: *String* *optional* the contents of the file
@@ -46,14 +47,15 @@ File contents cache.
4647
Every time before `readFile`,
4748
`cache` is checked.
4849

49-
*NOTE*: if `importer` gives `source`, it should handle `cache` itself.
50+
**NOTE**: if `importer` gives `source`, it should handle `cache` itself.
5051

5152
### readFile
5253
Specify how to read file contents.
5354

5455
Type: `Function`
5556

5657
Receives a filename and encoding.
58+
5759
Should return a promise which resolves to the contents of the file.
5860

5961
### glob
@@ -62,6 +64,7 @@ Specify how to resolve globs.
6264
Type: `Function`
6365

6466
Receives the glob string, and an object `{ cwd: dirname_of_the_processed_file }`.
67+
6568
Should return a promise which resolves to an array of file paths.
6669

6770

@@ -74,6 +77,7 @@ Specify how to resolve file paths.
7477
Type: `Function`
7578

7679
Receives the import string, and an object `{ basedir: dirname_of_the_processed_file }`.
80+
7781
Should return a promise which resolves to an absolute file path.
7882

7983
Type: `Object`
@@ -98,6 +102,7 @@ Type: `Function`
98102
Default: `postcss.parse`
99103

100104
Recieves an object `{ file: file_path, source: file_contents }`.
105+
101106
Should return a promise which resolves to the AST object
102107

103108

0 commit comments

Comments
 (0)