Skip to content

Commit

Permalink
KEY-20: Set concatenate option to false by default
Browse files Browse the repository at this point in the history
  • Loading branch information
JP Osorio committed Oct 5, 2015
1 parent 9108199 commit 4924ab8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

| Package | Description | Version|
| ------------- |:-------------:| -----:|
| Pipeline-minify-js| This pipeline concatenates and minifies js files | 0.1.0 |
| Pipeline-minify-js| This pipeline minifies and optionally concatenates js files | 0.1.0 |

# Overview

Expand Down Expand Up @@ -35,22 +35,22 @@ gulp.task('default', function() {
Pipeline options:
* _config_ -> Object that contains the configuration.

+ __config.concatenate:__ If _false_ the pipeline won't concatenate the files, hence it won't generate a js file e the files using `jscsrc`. You might want to disable JSCS if working on a legacy project. Otherwise this option should _false_.
+ __config.concatenate:__ If _true_ the pipeline will concatenate the files, hence it will generate a js file with all of the files concatenated.

+ __config.output:__ Sets the path to output the concatenate and minify files.


Default:
```javascript
config = {
concatenate: true,
concatenate: false,
output: 'dist/'
}
```

## Results

This pipeline returns an object. This object receives a stream with the files to minify, and you can call the _minifyJS_ method to execute the minification. Based on the configuration provided in _config.concatenate_, the pipeline will concatenate the files or no. After finishing the process you will have a folder named as _config.output_ . In this folder you can find the .min.js file, the source map, and a plain js file if the concatenation was executed.
This pipeline returns an object. This object receives a stream with the files to minify, and you can call the _minifyJS_ method to execute the minification. Based on the configuration provided in _config.concatenate_, the pipeline will concatenate the files or no. After finishing the process you will have a folder named as _config.output_ . In this folder you can find the .min.js file, the source map, and a plain js file if the concatenation was executed.



Expand Down
3 changes: 1 addition & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ var lazypipe = require('lazypipe');
var plugins = require('gulp-load-plugins')({lazy: true});

var config = {
concatenate: true,
concatenate: false,
output: 'dist/'
};

Expand Down Expand Up @@ -43,7 +43,6 @@ function buildPipeline(options) {
}

function concatJS() {
console.log(config.concatenate);
var bypass = lazypipe();
var concat = lazypipe()
.pipe(plugins.concat, 'build.js')
Expand Down

0 comments on commit 4924ab8

Please sign in to comment.