From 4924ab8353bd76ea9465adc2e366fa6116b3456b Mon Sep 17 00:00:00 2001 From: JP Osorio Date: Mon, 5 Oct 2015 12:02:14 -0400 Subject: [PATCH] KEY-20: Set concatenate option to false by default --- README.md | 8 ++++---- src/index.js | 3 +-- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 2cb5009..287a06f 100644 --- a/README.md +++ b/README.md @@ -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 @@ -35,7 +35,7 @@ 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. @@ -43,14 +43,14 @@ Pipeline options: 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. diff --git a/src/index.js b/src/index.js index 9184da5..3f411e2 100644 --- a/src/index.js +++ b/src/index.js @@ -9,7 +9,7 @@ var lazypipe = require('lazypipe'); var plugins = require('gulp-load-plugins')({lazy: true}); var config = { - concatenate: true, + concatenate: false, output: 'dist/' }; @@ -43,7 +43,6 @@ function buildPipeline(options) { } function concatJS() { - console.log(config.concatenate); var bypass = lazypipe(); var concat = lazypipe() .pipe(plugins.concat, 'build.js')