mirror of
https://github.com/fooflington/selfdefined.git
synced 2025-06-13 22:15:25 +00:00
update
This commit is contained in:
45
node_modules/browser-sync-ui/lib/plugins/connections/connections.plugin.js
generated
vendored
Normal file
45
node_modules/browser-sync-ui/lib/plugins/connections/connections.plugin.js
generated
vendored
Normal file
@ -0,0 +1,45 @@
|
||||
var connections = require("./lib/connections");
|
||||
|
||||
const PLUGIN_NAME = "Connections";
|
||||
|
||||
/**
|
||||
* @type {{plugin: Function, plugin:name: string, markup: string}}
|
||||
*/
|
||||
module.exports = {
|
||||
/**
|
||||
* @param {UI} ui
|
||||
* @param {BrowserSync} bs
|
||||
*/
|
||||
"plugin": function (ui, bs) {
|
||||
connections.init(ui, bs);
|
||||
},
|
||||
/**
|
||||
* Hooks
|
||||
*/
|
||||
"hooks": {
|
||||
"client:js": fileContent("/connections.client.js"),
|
||||
"templates": [
|
||||
getPath("/connections.directive.html")
|
||||
]
|
||||
},
|
||||
/**
|
||||
* Plugin name
|
||||
*/
|
||||
"plugin:name": PLUGIN_NAME
|
||||
};
|
||||
|
||||
/**
|
||||
* @param filepath
|
||||
* @returns {*}
|
||||
*/
|
||||
function getPath (filepath) {
|
||||
return require("path").join(__dirname, filepath);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param filepath
|
||||
* @returns {*}
|
||||
*/
|
||||
function fileContent (filepath) {
|
||||
return require("fs").readFileSync(getPath(filepath), "utf-8");
|
||||
}
|
Reference in New Issue
Block a user