mirror of
https://github.com/fooflington/selfdefined.git
synced 2025-06-12 05:31:41 +00:00
update
This commit is contained in:
25
node_modules/browser-sync-ui/lib/transform.options.js
generated
vendored
Normal file
25
node_modules/browser-sync-ui/lib/transform.options.js
generated
vendored
Normal file
@ -0,0 +1,25 @@
|
||||
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)];
|
||||
}
|
||||
}
|
||||
};
|
Reference in New Issue
Block a user