Updates to gulpfile.js

Removed comments and notify, as well as console.logs.
This commit is contained in:
Gustavo Tandeciarz
2015-08-10 07:53:19 -04:00
parent b399925368
commit de74c00378

View File

@@ -4,38 +4,16 @@ var glob = require("glob"),
gulpif = require("gulp-if"),
gulp = require("gulp"),
newer = require("gulp-newer"),
plumber = require("gulp-plumber"),
plumber = require("gulp-plumber"),
sourcemaps = require("gulp-sourcemaps"),
less = require("gulp-less"),
autoprefixer = require("gulp-autoprefixer"),
minify = require("gulp-minify-css"),
autoprefixer = require("gulp-autoprefixer"),
minify = require("gulp-minify-css"),
typescript = require("gulp-typescript"),
uglify = require("gulp-uglify"),
rename = require("gulp-rename"),
uglify = require("gulp-uglify"),
rename = require("gulp-rename"),
concat = require("gulp-concat"),
header = require("gulp-header"),
notify = require("gulp-notify")
/*
** GULP TASKS
---------------------------------------
Checks Themes, Modules, and Core directories for an Assets.json file.
Assets.json defines what Less, CSS, TypeScript, JS files should be processed by Gulp.
When defining your own Assets.json file, it should be saved in the root of module or theme project
Assets.json example:
Saved to /Modules/My.Custom.Module/Assets.json
[
{
"inputs": [ "Less/master.less" ], //Specifies which files to process during the Build task
"output": "Styles/@.css", //When @ is specified, each file specified in "inputs" will be converted to [filename].css
"watch": ["Less/*.less"], //specifies which files to watch, use this when you have a master Less file that imports other Less files
"generateSourceMaps": true //Will include source maps in unminified version, defaults to 'true'
}
]
"inputs" and "output" are required. All other properties are optional.
*/
header = require("gulp-header")
// Incremental build (each asset group is built only if one or more inputs are newer than the output).
gulp.task("build", function () {
@@ -120,12 +98,6 @@ function buildCssPipeline(assetGroup, doRebuild) {
throw "Input file '" + inputPath + "' is not of a valid type for output file '" + assetGroup.outputPath + "'.";
});
var doConcat = path.basename(assetGroup.outputFileName, ".css") !== "@";
if (!doRebuild) {
console.log("CSS will only rebuild if less files specified in 'inputs' are newer.");
}
else {
console.log("Force Rebuild is enabled, rebuilding all input files.");
}
var generateSourceMaps = assetGroup.hasOwnProperty("generateSourceMaps") ? assetGroup.generateSourceMaps : true;
return gulp.src(assetGroup.inputPaths)
.pipe(gulpif(!doRebuild,
@@ -153,8 +125,7 @@ function buildCssPipeline(assetGroup, doRebuild) {
.pipe(rename({
suffix: ".min"
}))
.pipe(gulp.dest(assetGroup.outputDir))
.pipe(gulpif(doRebuild, notify("Rebuild complete"), notify("Build process complete")));
.pipe(gulp.dest(assetGroup.outputDir));
}
function buildJsPipeline(assetGroup, doRebuild) {