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lib/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/undertaker-webpack@1.0.1/lib/index.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nexports.webpack = undefined;\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _path = require('path');\n\nvar _vinylFs = require('vinyl-fs');\n\nvar _vinylFs2 = _interopRequireDefault(_vinylFs);\n\nvar _gulpWebpack = require('gulp-webpack');\n\nvar _gulpWebpack2 = _interopRequireDefault(_gulpWebpack);\n\nvar _gulpMustache = require('gulp-mustache');\n\nvar _gulpMustache2 = _interopRequireDefault(_gulpMustache);\n\nvar _gulpRename = require('gulp-rename');\n\nvar _gulpRename2 = _interopRequireDefault(_gulpRename);\n\nvar _lodash = require('lodash');\n\nvar _webpackDevServer = require('webpack-dev-server');\n\nvar _webpackDevServer2 = _interopRequireDefault(_webpackDevServer);\n\nvar _undertakerRegistry = require('undertaker-registry');\n\nvar _undertakerRegistry2 = _interopRequireDefault(_undertakerRegistry);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar webpack = exports.webpack = _gulpWebpack2.default.webpack;\n\nvar WebpackRegistery = function (_DefaultRegistery) {\n  _inherits(WebpackRegistery, _DefaultRegistery);\n\n  function WebpackRegistery() {\n    var _ref = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];\n\n    var prefix = _ref.prefix;\n    var config = _ref.config;\n    var _ref$htmlFile = _ref.htmlFile;\n    var htmlFile = _ref$htmlFile === undefined ? true : _ref$htmlFile;\n    var _ref$configTemplate = _ref.configTemplate;\n    var configTemplate = _ref$configTemplate === undefined ? 'base' : _ref$configTemplate;\n    var _ref$custom = _ref.custom;\n    var custom = _ref$custom === undefined ? false : _ref$custom;\n    var templateValues = _ref.templateValues;\n    var path = _ref.path;\n    var entryFile = _ref.entryFile;\n    var outputPath = _ref.outputPath;\n    var _ref$port = _ref.port;\n    var port = _ref$port === undefined ? 3000 : _ref$port;\n\n    _classCallCheck(this, WebpackRegistery);\n\n    var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(WebpackRegistery).call(this));\n\n    if (configTemplate) {\n      config = require((0, _path.join)(__dirname, 'webpack.' + configTemplate + '.js'))(_extends({ templateValues: templateValues, webpack: webpack, path: path, htmlFile: htmlFile, entryFile: entryFile, outputPath: outputPath }, config));\n    } else {\n      config = require((0, _path.join)(__dirname, 'webpack.config.js'))(_extends({ templateValues: templateValues, webpack: webpack, path: path, htmlFile: htmlFile, entryFile: entryFile, outputPath: outputPath }, config));\n    }\n\n    Object.assign(_this, { prefix: prefix, config: config, templateValues: templateValues, custom: custom, path: path, htmlFile: htmlFile, entryFile: entryFile, outputPath: outputPath, port: port });\n    return _this;\n  }\n\n  _createClass(WebpackRegistery, [{\n    key: 'init',\n    value: function init(taker) {\n      var _this2 = this;\n\n      taker.task(this.prefix + ':webpack', function () {\n        return _vinylFs2.default.src(_this2.entryFile).pipe((0, _gulpWebpack2.default)(_this2.config)).pipe(_vinylFs2.default.dest(_this2.outputPath));\n      });\n\n      if ((0, _lodash.isString)(this.htmlFile)) {\n        taker.task(this.prefix + ':html', function () {\n          return _vinylFs2.default.src(_this2.htmlFile).pipe((0, _gulpMustache2.default)(_extends({\n            bundlePath: _this2.config.output.filename,\n            host: 'http://localhost:' + _this2.port\n          }, _this2.templateValues))).pipe((0, _gulpRename2.default)('index.html')).pipe(_vinylFs2.default.dest(_this2.outputPath));\n        });\n      }\n\n      taker.task(this.prefix + ':server', function () {\n        var webpackCompiler = webpack(_this2.config);\n\n        new _webpackDevServer2.default(webpackCompiler, {\n          contentBase: _this2.config.output.path,\n          hot: true,\n          quiet: true\n        }).listen(_this2.port, 'localhost', function (err) {\n          if (err) {\n            console.error(err);\n          } else {\n            console.log('🌎  http://localhost:' + _this2.port);\n          }\n        });\n      });\n\n      if ((0, _lodash.isString)(this.htmlFile)) {\n        return taker.task(this.prefix, taker.parallel(this.prefix + ':webpack', this.prefix + ':html'));\n      } else {\n        return taker.task(this.prefix, taker.series(this.prefix + ':webpack'));\n      }\n    }\n  }]);\n\n  return WebpackRegistery;\n}(_undertakerRegistry2.default);\n\nexports.default = WebpackRegistery;"]}