Skip to content

Commit 7ca959e

Browse files
author
Contra
committed
remove watch #92
1 parent 3e2a5ef commit 7ca959e

File tree

3 files changed

+18
-23
lines changed

3 files changed

+18
-23
lines changed

README.md

+16-19
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
# vinyl-fs [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Dependency Status][depstat-image]][depstat-url]
2-
32
## Information
4-
53
<table>
64
<tr>
75
<td>Package</td><td>vinyl-fs</td>
@@ -33,9 +31,7 @@ fs.src(['./js/**/*.js', '!./js/vendor/*.js'])
3331
```
3432

3533
## API
36-
3734
### src(globs[, opt])
38-
3935
- Takes a glob string or an array of glob strings as the first argument.
4036
- Globs are executed in order, so negations should follow positive globs. For example:
4137

@@ -52,54 +48,54 @@ fs.src(['*.js', '!b*.js'])
5248
- Possible options for the second argument:
5349
- cwd - Specify the working directory the folder is relative to.
5450
- Default is `process.cwd()`.
51+
5552
- base - Specify the folder relative to the cwd. This is used to determine the file names when saving in `.dest()`.
5653
- Default is where the glob begins if any.
5754
- Default is `process.cwd()` if there is no glob.
55+
5856
- buffer - `true` or `false` if you want to buffer the file.
5957
- Default value is `true`.
6058
- `false` will make `file.contents` a paused Stream.
59+
6160
- read - `true` or `false` if you want the file to be read or not. Useful for stuff like `rm`ing files.
6261
- Default value is `true`.
6362
- `false` will disable writing the file to disk via `.dest()`.
63+
6464
- since - `Date` or `number` if you only want files that have been modified since the time specified.
6565
- passthrough - `true` or `false` if you want a duplex stream which passes items through and emits globbed files.
6666
- Default is `false`.
67+
6768
- sourcemaps - `true` or `false` if you want files to have sourcemaps enabled.
6869
- Default is `false`.
70+
6971
- Any glob-related options are documented in [glob-stream] and [node-glob].
72+
7073
- Returns a Readable stream by default, or a Duplex stream if the `passthrough` option is set to `true`.
7174
- This stream emits matching [vinyl] File objects.
7275

73-
_Note:_ UTF-8 BOM will be stripped from all files read with `.src`.
74-
75-
### watch(globs[, opt, cb])
76-
77-
This is just [glob-watcher].
78-
79-
- Takes a glob string or an array of glob strings as the first argument.
80-
- Possible options for the second argument:
81-
- Any options are passed to [gaze].
82-
- Returns an EventEmitter.
83-
- 'changed' event is emitted on each file change.
84-
- Optionally calls the callback on each change event.
76+
_Note:_ UTF-8 BOM will be stripped from all UTF-8 files read with `.src`.
8577

8678
### dest(folder[, opt])
87-
8879
- Takes a folder path as the first argument.
8980
- First argument can also be a function that takes in a file and returns a folder path.
9081
- Possible options for the second argument:
9182
- cwd - Specify the working directory the folder is relative to.
9283
- Default is `process.cwd()`.
84+
9385
- base - Specify the folder relative to the cwd. This is used to determine the file names when saving in `.dest()`.
9486
- Default is the `cwd` resolves to the folder path.
9587
- Can also be a function that takes in a file and returns a folder path.
88+
9689
- mode - Specify the mode the files should be created with.
9790
- Default is the mode of the input file (file.stat.mode) if any.
9891
- Default is the process mode if the input file has no mode property.
92+
9993
- dirMode - Specify the mode the directory should be created with.
10094
- Default is the process mode.
95+
10196
- overwrite - Specify if existing files with the same path should be overwritten or not.
10297
- Default is `true`, to always overwrite existing files.
98+
10399
- Returns a Readable/Writable stream.
104100
- On write the stream will save the [vinyl] File to disk at the folder/cwd specified.
105101
- After writing the file to disk, it will be emitted from the stream so you can keep piping these around.
@@ -109,16 +105,18 @@ This is just [glob-watcher].
109105
- `contents` will have it's position reset to the beginning if it is a stream.
110106

111107
### symlink(folder[, opt])
112-
113108
- Takes a folder path as the first argument.
114109
- First argument can also be a function that takes in a file and returns a folder path.
115110
- Possible options for the second argument:
116111
- cwd - Specify the working directory the folder is relative to.
117112
- Default is `process.cwd()`.
113+
118114
- base - Specify the folder relative to the cwd. This is used to determine the file names when saving in `.dest()`.
119115
- Default is the `cwd` resolves to the folder path.
116+
120117
- dirMode - Specify the mode the directory should be created with.
121118
- Default is the process mode.
119+
122120
- Returns a Readable/Writable stream.
123121
- On write the stream will create a symbolic link (i.e. symlink) on disk at the folder/cwd specified.
124122
- After creating the symbolic link, it will be emitted from the stream so you can keep piping these around.
@@ -130,7 +128,6 @@ This is just [glob-watcher].
130128
[gaze]: https://github.com/shama/gaze
131129
[glob-watcher]: https://github.com/wearefractal/glob-watcher
132130
[vinyl]: https://github.com/wearefractal/vinyl
133-
134131
[npm-url]: https://www.npmjs.com/package/vinyl-fs
135132
[npm-image]: https://badge.fury.io/js/vinyl-fs.svg
136133
[travis-url]: https://travis-ci.org/wearefractal/vinyl-fs

index.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,5 @@
33
module.exports = {
44
src: require('./lib/src'),
55
dest: require('./lib/dest'),
6-
symlink: require('./lib/symlink'),
7-
watch: require('glob-watcher')
6+
symlink: require('./lib/symlink')
87
};

package.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "vinyl-fs",
33
"description": "Vinyl adapter for the file system",
4-
"version": "1.0.0",
4+
"version": "2.0.0",
55
"homepage": "http://github.com/wearefractal/vinyl-fs",
66
"repository": "git://github.com/wearefractal/vinyl-fs.git",
77
"author": "Fractal <[email protected]> (http://wearefractal.com/)",
@@ -13,7 +13,6 @@
1313
"dependencies": {
1414
"duplexify": "^3.2.0",
1515
"glob-stream": "^5.0.0",
16-
"glob-watcher": "^2.0.0",
1716
"graceful-fs": "^4.0.0",
1817
"gulp-sourcemaps": "^1.5.2",
1918
"is-valid-glob": "^0.3.0",

0 commit comments

Comments
 (0)