Skip to content

Commit

Permalink
Make samples in README.md a bit simpler
Browse files Browse the repository at this point in the history
  • Loading branch information
manisenkov committed Jan 31, 2016
1 parent f7d6e35 commit 9164659
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ $ npm install --save-dev gulp-babel babel-preset-es2015
const gulp = require('gulp');
const babel = require('gulp-babel');

gulp.task('default', () => {
return gulp.src('src/app.js')
gulp.task('default', () =>
gulp.src('src/app.js')
.pipe(babel({
presets: ['es2015']
}))
.pipe(gulp.dest('dist'));
});
.pipe(gulp.dest('dist'))
);
```


Expand All @@ -47,16 +47,16 @@ const sourcemaps = require('gulp-sourcemaps');
const babel = require('gulp-babel');
const concat = require('gulp-concat');

gulp.task('default', () => {
return gulp.src('src/**/*.js')
gulp.task('default', () =>
gulp.src('src/**/*.js')
.pipe(sourcemaps.init())
.pipe(babel({
presets: ['es2015']
}))
.pipe(concat('all.js'))
.pipe(sourcemaps.write('.'))
.pipe(gulp.dest('dist'));
});
.pipe(gulp.dest('dist'))
);
```


Expand All @@ -78,13 +78,13 @@ function logFileHelpers() {
});
}

gulp.task('default', () => {
return gulp.src('src/**/*.js')
gulp.task('default', () =>
gulp.src('src/**/*.js')
.pipe(babel({
presets: ['es2015']
}))
.pipe(logFileHelpers());
})
.pipe(logFileHelpers())
)
```


Expand All @@ -104,13 +104,13 @@ Use it as plugin:
const gulp = require('gulp');
const babel = require('gulp-babel');

gulp.task('default', () => {
return gulp.src('src/app.js')
gulp.task('default', () =>
gulp.src('src/app.js')
.pipe(babel({
plugins: ['transform-runtime']
}))
.pipe(gulp.dest('dist'));
});
.pipe(gulp.dest('dist'))
);
```


Expand Down

0 comments on commit 9164659

Please sign in to comment.