Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Very small change on readme for keeping indentation #19

Merged
merged 2 commits into from
Sep 29, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 19 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,38 +8,38 @@ Deprecated in favor of [https://github.com/gulpjs/gulp/blob/master/docs/recipes/
Usage
-----

1. Delete a folder: use [rimraf](https://github.com/isaacs/rimraf) directly *(you don't need gulp-rimraf!)*:
1. Delete a folder: use [rimraf](https://github.com/isaacs/rimraf) directly *(you don't need gulp-rimraf!)*:

```javascript
var rimraf = require('rimraf'); // rimraf directly
gulp.task('task', function (cb) {
```javascript
var rimraf = require('rimraf'); // rimraf directly
gulp.task('task', function (cb) {
rimraf('./folder', cb);
});
```
});
```

2. Delete some files in a folder: use gulp-rimraf
2. Delete some files in a folder: use gulp-rimraf

```javascript
var ignore = require('gulp-ignore');
var rimraf = require('gulp-rimraf');
```javascript
var ignore = require('gulp-ignore');
var rimraf = require('gulp-rimraf');

gulp.task('task', function() {
gulp.task('task', function() {
return gulp.src('./**/*.js', { read: false }) // much faster
.pipe(ignore('node_modules/**'))
.pipe(rimraf());
});
```
Setting option `read` to false prevents gulp to read the contents of the files and makes this task much faster.
});
```
Setting option `read` to false prevents gulp to read the contents of the files and makes this task much faster.

Files and folders outside the current working directory can be removed with `force` option.
Files and folders outside the current working directory can be removed with `force` option.

```javascript
var rimraf = require('gulp-rimraf');
```javascript
var rimraf = require('gulp-rimraf');

gulp.task('task', function() {
gulp.task('task', function() {
return gulp.src('../temp/*.js', { read: false })
.pipe(rimraf({ force: true }));
});
});
```

LICENSE
Expand Down