aem-front
Version:
AEM Front speeds up development in AEM significantly. It combines AEMSync with BrowserSync, and also works together with the AEM Front Extension for Google Chrome so you don't have to manually inject the BrowserSync script into your code base.
29 lines (24 loc) • 664 B
JavaScript
const browserSync = require("browser-sync");
const create = args => {
// Documentation: https://www.browsersync.io/docs/options
const options = {
notify: false,
open: false,
proxy: args.proxy
};
browserSync.create(args.name);
browserSync.init(options, function(unknown, data) {
// Callback:
// console.log(data.options.get("urls").get("ui"));
// console.log(data.options.get("urls").get("ui-external"));
});
};
const reload = args => {
console.log("Reloading browsers.");
// Documentation: https://www.browsersync.io/docs/api#api-reload
browserSync.reload(args.name);
};
module.exports = {
create,
reload
};