Skip to content

Commit cc0cafc

Browse files
committedJul 3, 2018
Update documentation to fast-glob
1 parent 4d87efc commit cc0cafc

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed
 

‎README.md

+9-9
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,17 @@
1-
mem-fs-editor [![Build Status](https://api.travis-ci.org/SBoudrias/mem-fs-editor.svg?branch=master)](https://travis-ci.org/SBoudrias/mem-fs-editor) [![NPM version](https://badge.fury.io/js/mem-fs-editor.svg)](http://badge.fury.io/js/mem-fs-editor) [![Coverage Status](https://coveralls.io/repos/github/SBoudrias/mem-fs-editor/badge.svg)](https://coveralls.io/github/SBoudrias/mem-fs-editor)
2-
=============
1+
# mem-fs-editor [![Build Status](https://api.travis-ci.org/SBoudrias/mem-fs-editor.svg?branch=master)](https://travis-ci.org/SBoudrias/mem-fs-editor) [![NPM version](https://badge.fury.io/js/mem-fs-editor.svg)](http://badge.fury.io/js/mem-fs-editor) [![Coverage Status](https://coveralls.io/repos/github/SBoudrias/mem-fs-editor/badge.svg)](https://coveralls.io/github/SBoudrias/mem-fs-editor)
32

43
File edition helpers working on top of [mem-fs](https://github.com/SBoudrias/mem-fs)
54

6-
Usage
7-
-------------
5+
## Usage
86

97
```js
10-
var memFs = require('mem-fs');
11-
var editor = require('mem-fs-editor');
8+
var memFs = require("mem-fs");
9+
var editor = require("mem-fs-editor");
1210

1311
var store = memFs.create();
1412
var fs = editor.create(store);
1513

16-
fs.write('somefile.js', 'var a = 1;');
14+
fs.write("somefile.js", "var a = 1;");
1715
```
1816

1917
### `#read(filepath, [options])`
@@ -61,7 +59,7 @@ Optionally take the same JSON formatting arguments than `#writeJSON()`.
6159

6260
Delete a file or a directory.
6361

64-
`filePath` can also be a `glob`. If `filePath` is glob, you can optionally pass in an `options.globOptions` object to change its pattern matching behavior. The full list of options are being described [here](https://github.com/isaacs/node-glob#options). The `sync` flag is forced to be `true` in `globOptions`.
62+
`filePath` can also be a `glob`. If `filePath` is glob, you can optionally pass in an `options.globOptions` object to change its pattern matching behavior. The full list of options are being described [here](https://github.com/mrmlnc/fast-glob#options-1). The `sync` flag is forced to be `true` in `globOptions`.
6563

6664
### `#copy(from, to, [options], context[, templateOptions ])`
6765

@@ -71,7 +69,7 @@ Optionally, pass an `options.process` function (`process(contents)`) returning a
7169

7270
`option.ignoreNoMatch` can be used to silence the error thrown if no files match the `from` pattern.
7371

74-
`from` can be a glob pattern that'll be match against the file system. If that's the case, then `to` must be an output directory. For a globified `from`, you can optionally pass in an `options.globOptions` object to change its pattern matching behavior. The full list of options are being described [here](https://github.com/isaacs/node-glob#options). The `nodir` flag is forced to be `true` in `globOptions` to ensure a vinyl object representing each matching directory is marked as `deleted` in the `mem-fs` store.
72+
`from` can be a glob pattern that'll be match against the file system. If that's the case, then `to` must be an output directory. For a globified `from`, you can optionally pass in an `options.globOptions` object to change its pattern matching behavior. The full list of options are being described [here](https://github.com/mrmlnc/fast-glob#options-1). The `nodir` flag is forced to be `true` in `globOptions` to ensure a vinyl object representing each matching directory is marked as `deleted` in the `mem-fs` store.
7573

7674
### `#copyTpl(from, to, context[, templateOptions [, copyOptions]])`
7775

@@ -87,7 +85,9 @@ Templates syntax looks like this:
8785
<%= value %>
8886
<%- include('partial.ejs', { name: 'Simon' }) %>
8987
```
88+
9089
Dir syntax looks like this:
90+
9191
```
9292
/some/path/dir<%= value %>/...
9393
```

0 commit comments

Comments
 (0)
Please sign in to comment.