/**
 * Gulp file.
 */
var gulp = require("gulp");
var eslint = require("gulp-eslint");
var jscs = require("gulp-jscs");

// ----------------------------------------------------------------------------
// EsLint
// ----------------------------------------------------------------------------
var _eslint = function (files, cfg) {
  return function () {
    return gulp
      .src(files)
      .pipe(eslint(cfg))
      .pipe(eslint.formatEach("stylish", process.stderr))
      .pipe(eslint.failOnError());
  };
};

gulp.task("eslint:frontend", _eslint([
  "console-stream.js"
], {
  envs: ["browser"]
}));

gulp.task("eslint:backend", _eslint([
  "gulpfile.js",
  "webpack.*.js"
], {
  envs: ["node"]
}));

gulp.task("eslint", ["eslint:frontend", "eslint:backend"]);

// ----------------------------------------------------------------------------
// JsCs
// ----------------------------------------------------------------------------
gulp.task("jscs", function () {
  return gulp
    .src(["*.js"])
    .pipe(jscs());
});

// ----------------------------------------------------------------------------
// Aggregations
// ----------------------------------------------------------------------------
gulp.task("check", ["eslint", "jscs"]);
gulp.task("check:ci", ["eslint", "jscs"]);
gulp.task("default", ["check"]);

@@ -1012,24 +1012,463 @@
 cs());%0A%7D);%0A%0A
+// ----------------------------------------------------------------------------%0A// Publication checks%0A// ----------------------------------------------------------------------------%0Agulp.task(%22chk%22, function () %7B%0A  var bower = require(%22./bower.json%22);%0A  var npm = require(%22./package.json%22);%0A%0A  if (bower.version !== npm.version) %7B%0A    throw new Error(%0A      %22Bower (%22 + bower.version + %22) / NPM  (%22 + npm.version + %22) mismatch%22);%0A  %7D%0A%7D);%0A%0A
 // ---------
@@ -1551,16 +1551,16 @@
 gations%0A
-
 // -----
@@ -1647,24 +1647,31 @@
 k(%22check%22, %5B
+%22chk%22, 
 %22eslint%22, %22j
@@ -1697,24 +1697,31 @@
 check:ci%22, %5B
+%22chk%22, 
 %22eslint%22, %22j

Add publication checks.