Sha256: 885e8a40bdd68249193c7ede6ee5ed6e589e6cf16b31c11fd5be07fe1b727770

Contents?: true

Size: 766 Bytes

Versions: 2

Compression:

Stored size: 766 Bytes

Contents

var babelify = require("babelify"),
    source = require("vinyl-source-stream"),
    buffer = require("vinyl-buffer"),
    config = require("../config"),
    browser_sync = require("browser-sync"),
    handle_errors = require("../utilities/handle_errors"),
    path = require("path");

module.exports = function(bundler, gulp, plugins) {
  bundler.transform(babelify.configure(config.plugins.babel));

  return function() {
    return bundler.bundle()
      .on("error", handle_errors)
      .pipe(source(path.basename(config.source.scripts.main[0])))
      .pipe(buffer())
      .pipe(plugins.sourcemaps.init({ loadMaps: true }))
      .pipe(plugins.sourcemaps.write())
      .pipe(gulp.dest(config.destination.scripts))
      .pipe(browser_sync.stream());
  };
};

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
docks_theme_api-1.0.3 tasks/gulp/utilities/browserify_bundler.js
docks_theme_api-1.0.2 tasks/gulp/utilities/browserify_bundler.js