Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 uid=33(www-data) gid=33(www-data) groups=33(www-data) Safe-mode: OFF (not secure) /var/www/html/queuepro/node_modules/browser-sync/dist/cli/ drwxrwxr-x | |
| Viewing file: Select action/file-type: "use strict";
var config = require("../config");
var logger = require("../logger").logger;
var fs = require("fs");
var _ = require("../lodash.custom");
var path = require("path");
var info = {
/**
* Version info
* @param {Object} pjson
* @returns {String}
*/
getVersion: function (pjson) {
console.log(pjson.version);
return pjson.version;
},
/**
* Retrieve the config file
* @returns {*}
* @private
* @param filePath
*/
getConfigFile: function (filePath) {
return require(path.resolve(filePath));
},
/**
* Generate an example Config file.
*/
makeConfig: function (cwd, cb) {
var opts = require(path.join(__dirname, "..", config.configFile));
var userOpts = {};
var ignore = ["excludedFileTypes", "injectFileTypes", "snippetOptions"];
Object.keys(opts).forEach(function (key) {
if (!_.includes(ignore, key)) {
userOpts[key] = opts[key];
}
});
var file = fs.readFileSync(config.template, "utf8");
file = file.replace("//OPTS", JSON.stringify(userOpts, null, 4));
fs.writeFile(path.resolve(cwd, config.userFile), file, function () {
logger.info("Config file created {magenta:%s}", config.userFile);
logger.info("To use it, in the same directory run: " +
"{cyan:browser-sync start --config bs-config.js}");
cb();
});
}
};
module.exports = info;
//# sourceMappingURL=cli-info.js.map |
:: Command execute :: | |
--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0127 ]-- |