Bones/node_modules/browser-sync-ui/lib/transform.options.js
SOUTHERNCO\x2mjbyrn 7efe7605b8 Template Upload
2017-05-17 13:45:25 -04:00

25 lines
600 B
JavaScript

var path = require("path");
module.exports = function (bs) {
/**
* Transform server options to offer additional functionality
* @param bs
*/
var options = bs.options;
var server = options.server;
var cwd = bs.cwd;
/**
* Transform server option
*/
if (server) {
if (Array.isArray(server.baseDir)) {
server.baseDirs = options.server.baseDir.map(function (item) {
return path.join(cwd, item);
});
} else {
server.baseDirs = [path.join(cwd, server.baseDir)];
}
}
};