HEX
Server: Apache/2.4.34 (Red Hat) OpenSSL/1.0.2k-fips
System: Linux WORDPRESS 3.10.0-1160.118.1.el7.x86_64 #1 SMP Thu Apr 4 03:33:23 EDT 2024 x86_64
User: digital (1020)
PHP: 7.2.24
Disabled: NONE
Upload Files
File: /datos/www/www.colombia.co/public_html/node_modules/browser-sync/dist/public/init.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var _ = require("../lodash.custom");
const cli_options_1 = require("../cli/cli-options");
/**
 * @param {BrowserSync} browserSync
 * @param {String} [name] - instance name
 * @param {Object} pjson
 * @returns {Function}
 */
module.exports = function (browserSync, name, pjson) {
    return function () {
        /**
         * Handle new + old signatures for init.
         */
        var args = require("../args")(_.toArray(arguments));
        /**
         * If the current instance is already running, just return an error
         */
        if (browserSync.active) {
            return args.cb(new Error(`Instance: ${name} is already running!`));
        }
        // Env specific items
        args.config.version = pjson.version;
        args.config.cwd = args.config.cwd || process.cwd();
        const [opts, errors] = (0, cli_options_1.merge)(args.config);
        if (errors.length) {
            return args.cb(new Error((0, cli_options_1.printErrors)(errors)));
        }
        return browserSync.init(opts, args.cb);
    };
};
//# sourceMappingURL=init.js.map