Skip to content

Commit

Permalink
Fix code indentation in README
Browse files Browse the repository at this point in the history
  • Loading branch information
svenschoenung committed Nov 13, 2016
1 parent 8b2b177 commit fcbca42
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 @@ -23,23 +23,23 @@ One often encountered use case is to generate separate **development** and **pro
We can use `gulp-parameterized` to parameterize the `build` task with a `--production` flag:

```JavaScript
var gulp = require('gulp');
var parameterized = require('gulp-parameterized');
var gulp = require('gulp');
var parameterized = require('gulp-parameterized');

gulp.task('build', parameterized(function(_) {
if (_.params.production) {
/* do a production build */
return gulp.src('src/*.js').pipe(...);
} else {
/* do a development build */
return gulp.src('src/*.js').pipe(...);
}
}));

gulp.task('deploy', parameterized.series('build --production', function(cb) {
/* copy to server */
cb();
}));
gulp.task('build', parameterized(function(_) {
if (_.params.production) {
/* do a production build */
return gulp.src('src/*.js').pipe(...);
} else {
/* do a development build */
return gulp.src('src/*.js').pipe(...);
}
}));

gulp.task('deploy', parameterized.series('build --production', function(cb) {
/* copy to server */
cb();
}));
```

Now running any of the following commands will generate a **production** build:
Expand Down

0 comments on commit fcbca42

Please sign in to comment.